From c1adf295ac4fab322fa8867676743076f83f3431 Mon Sep 17 00:00:00 2001 From: Birger Schacht Date: Wed, 27 Sep 2023 16:13:38 +0200 Subject: [PATCH] feat: show name as identifier for Title and Profession --- apis_ontology/models.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/apis_ontology/models.py b/apis_ontology/models.py index 1d2e28d..5fc32e4 100644 --- a/apis_ontology/models.py +++ b/apis_ontology/models.py @@ -19,11 +19,17 @@ class Meta: class Title(models.Model): name = models.CharField(max_length=255, blank=True) + def __str__(self): + return self.name + class Profession(models.Model): name = models.CharField(max_length=255, blank=True) parent = models.ForeignKey('self', blank=True, null=True, on_delete=models.CASCADE) + def __str__(self): + return self.name + @reversion.register(follow=["rootobject_ptr"]) class Event(LegacyStuffMixin, LegacyDateMixin, AbstractEntity):