From 6f7c3dc52f64b31550fa3e679a975dbb45cc41eb Mon Sep 17 00:00:00 2001 From: Birger Schacht Date: Tue, 14 May 2024 09:41:49 +0200 Subject: [PATCH] fix(apis_entities): set max_length for charfields in abstract classes Some databases don't allow unlimited charfields, so we have to set the value. --- apis_core/apis_entities/abc.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/apis_core/apis_entities/abc.py b/apis_core/apis_entities/abc.py index ecac3d22e..1d9a6845e 100644 --- a/apis_core/apis_entities/abc.py +++ b/apis_core/apis_entities/abc.py @@ -11,9 +11,9 @@ class E21_Person(models.Model): - forename = models.CharField(blank=True, default="") - surname = models.CharField(blank=True, default="") - gender = models.CharField(blank=True, default="") + forename = models.CharField(blank=True, default="", max_length=4096) + surname = models.CharField(blank=True, default="", max_length=4096) + gender = models.CharField(blank=True, default="", max_length=4096) date_of_birth = models.DateField(blank=True, null=True) date_of_death = models.DateField(blank=True, null=True) @@ -22,7 +22,7 @@ class Meta: class E53_Place(models.Model): - label = models.CharField(blank=True, default="") + label = models.CharField(blank=True, default="", max_length=4096) longitude = models.FloatField(blank=True, null=True) latitude = models.FloatField(blank=True, null=True) @@ -31,7 +31,7 @@ class Meta: class E74_Group(models.Model): - label = models.CharField(blank=True, default="") + label = models.CharField(blank=True, default="", max_length=4096) class Meta: abstract = True