diff --git a/backend/postings/models.py b/backend/postings/models.py index cf9fd89..0054bed 100644 --- a/backend/postings/models.py +++ b/backend/postings/models.py @@ -44,6 +44,12 @@ class RateableEntity(models.Model): def __str__(self): return self.name + def getType(self): + for (t, t_name) in RateableEntity.TYPE_CHOICES: + if t == self.entity_type: + return t_name + return '' + # A review represents any single data entry to the database. class Review(models.Model): # An integer rating in the domain [1, 5]