Skip to content

Commit

Permalink
fix(apis_entities): set max_length for charfields in abstract classes
Browse files Browse the repository at this point in the history
Some databases don't allow unlimited charfields, so we have to set the
value.
  • Loading branch information
b1rger committed May 14, 2024
1 parent e471da0 commit 6f7c3dc
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions apis_core/apis_entities/abc.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand All @@ -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)

Expand All @@ -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

0 comments on commit 6f7c3dc

Please sign in to comment.