diff options
Diffstat (limited to '')
-rw-r--r-- | ctrack/users/models.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/ctrack/users/models.py b/ctrack/users/models.py index b53c217..688254f 100644 --- a/ctrack/users/models.py +++ b/ctrack/users/models.py @@ -15,3 +15,13 @@ class User(AbstractUser): def get_absolute_url(self): return reverse("users:detail", kwargs={"username": self.username}) + + def is_stakeholder(self): + if self.stakeholder is not None: + return True + else: + return False + + def get_organisation_name(self): + if self.is_stakeholder(): + return self.stakeholder.person.organisation.name |