Skip to content

Commit

Permalink
Return label/name with primary key for entities
Browse files Browse the repository at this point in the history
  • Loading branch information
gythaogg committed Apr 23, 2024
1 parent 9ca93df commit d30cbe7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions apis_ontology/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ class Meta:
verbose_name_plural = _("Persons")

def __str__(self):
return f"{self.name}"
return f"{self.name} ({self.pk})"


class Place(
Expand Down Expand Up @@ -138,7 +138,7 @@ class Meta:
verbose_name_plural = _("Works")

def __str__(self):
return f"{self.name}"
return f"{self.name} ({self.pk})"


class Instance(
Expand Down Expand Up @@ -228,7 +228,7 @@ class Meta:
verbose_name_plural = _("Instances")

def __str__(self):
return f"{self.name}"
return f"{self.name} ({self.pk})"


class ZoteroEntry(GenericModel, models.Model):
Expand Down

0 comments on commit d30cbe7

Please sign in to comment.