Skip to content

Commit

Permalink
fix: use apis_core.generic.abc.GenericModel
Browse files Browse the repository at this point in the history
  • Loading branch information
b1rger committed Feb 28, 2024
1 parent eb898de commit eeda513
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions apis_ontology/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
from apis_core.core.models import LegacyDateMixin
from apis_core.utils.helpers import create_object_from_uri
from apis_core.utils import DateParser
from apis_core.generic.abc import GenericModel


class LegacyStuffMixin(models.Model):
Expand All @@ -29,7 +30,7 @@ def get_or_create_uri(cls, uri):


@reversion.register
class Source(models.Model):
class Source(GenericModel, models.Model):
orig_filename = models.CharField(max_length=255, blank=True)
indexed = models.BooleanField(default=False)
pubinfo = models.CharField(max_length=400, blank=True)
Expand All @@ -47,23 +48,23 @@ def __str__(self):


@reversion.register
class Title(models.Model):
class Title(GenericModel, models.Model):
name = models.CharField(max_length=255, blank=True)

def __str__(self):
return self.name


@reversion.register
class ProfessionCategory(models.Model):
class ProfessionCategory(GenericModel, models.Model):
name = models.CharField(max_length=255, blank=False)

def __str__(self):
return self.name


@reversion.register
class Profession(models.Model):
class Profession(GenericModel, models.Model):
class Meta:
ordering = ("name",)

Expand Down Expand Up @@ -127,7 +128,7 @@ class Work(LegacyStuffMixin, LegacyDateMixin, AbstractEntity):


@reversion.register
class Text(models.Model):
class Text(GenericModel, models.Model):
TEXTTYPE_CHOICES = [
(1, "Place description ÖBL"),
(2, "ÖBL Haupttext"),
Expand Down

0 comments on commit eeda513

Please sign in to comment.