Skip to content

Commit

Permalink
refactor(apis_entities): drop core.abc.LabelBaseModel
Browse files Browse the repository at this point in the history
We decided to drop the label for the E21_Person model, because it has a
forename and a surname. Because there are now only two BaseModels left
that use the LabelBaseModel, we moved the label field directly in those
models and dropped the LabelBaseModel
  • Loading branch information
b1rger committed Mar 20, 2024
1 parent abe96bf commit 0f14583
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions apis_core/apis_entities/abc.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
from django.db import models
from apis_core.core.abc import LabelBaseModel

#########################
# Abstract base classes #
Expand All @@ -11,7 +10,7 @@
# trying to implement CIDOC CRM in Django.


class E21_Person(LabelBaseModel, models.Model):
class E21_Person(models.Model):
forename = models.CharField(blank=True, default="")
surname = models.CharField(blank=True, default="")
gender = models.CharField(blank=True, default="")
Expand All @@ -22,7 +21,8 @@ class Meta:
abstract = True


class E53_Place(LabelBaseModel, models.Model):
class E53_Place(models.Model):
label = models.CharField(blank=True, default="")
longitude = models.FloatField(blank=True, null=True)
latitude = models.FloatField(blank=True, null=True)

Expand All @@ -31,5 +31,7 @@ class Meta:


class E74_Group(LabelBaseModel, models.Model):
label = models.CharField(blank=True, default="")

class Meta:
abstract = True

0 comments on commit 0f14583

Please sign in to comment.