From 0f14583e8920012d10c42914327c1b43d1741b31 Mon Sep 17 00:00:00 2001 From: Birger Schacht Date: Wed, 20 Mar 2024 08:36:54 +0100 Subject: [PATCH] refactor(apis_entities): drop core.abc.LabelBaseModel 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 --- apis_core/apis_entities/abc.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/apis_core/apis_entities/abc.py b/apis_core/apis_entities/abc.py index aa2dd33b7..aea21ac66 100644 --- a/apis_core/apis_entities/abc.py +++ b/apis_core/apis_entities/abc.py @@ -1,5 +1,4 @@ from django.db import models -from apis_core.core.abc import LabelBaseModel ######################### # Abstract base classes # @@ -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="") @@ -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) @@ -31,5 +31,7 @@ class Meta: class E74_Group(LabelBaseModel, models.Model): + label = models.CharField(blank=True, default="") + class Meta: abstract = True