Refactor activity feed template logic

Yay for removing arbitrary if/else chains!
This commit is contained in:
2020-05-30 14:00:26 +01:00
parent 156e639bac
commit e45324f5b4
5 changed files with 48 additions and 59 deletions

View File

@@ -609,5 +609,9 @@ class RiskAssessment(models.Model):
# Blimey that was a lot of options
@property
def activity_feed_string(self):
return str(self.event)
def __str__(self):
return "%i: %s" % (self.pk, self.event)
return "%i - %s" % (self.pk, self.event)