diff --git a/scipost_django/scipost/models.py b/scipost_django/scipost/models.py index 1525fa28f0d7219f4ac1306c76631e7b12d8ab40..7841caab8cccfe284c3abff54c2b9d04be7539f2 100644 --- a/scipost_django/scipost/models.py +++ b/scipost_django/scipost/models.py @@ -28,6 +28,7 @@ from .constants import ( AUTHORSHIP_CLAIM_STATUS, CONTRIBUTOR_STATUSES, NEWLY_REGISTERED, + TITLE_DR, ) from .fields import ChoiceArrayField from .managers import ( @@ -232,6 +233,10 @@ class Contributor(models.Model): or self.user.is_superuser ) + @property + def profile_title(self) -> str: + return self.profile.get_title_display() if self.profile else TITLE_DR + def generate_key(self, feed=""): """Generate a new activation_key for the contributor, given a certain feed.""" for i in range(5):