diff --git a/RIGS/models.py b/RIGS/models.py index 7d7427e6..a075d9aa 100644 --- a/RIGS/models.py +++ b/RIGS/models.py @@ -609,7 +609,7 @@ class Payment(models.Model, RevisionMixin): @property def activity_feed_string(self): - return str("payment at £{}".format(self.amount)) + return str("payment of £{}".format(self.amount)) def validate_url(value): diff --git a/versioning/versioning.py b/versioning/versioning.py index 3d245e3a..31b55868 100644 --- a/versioning/versioning.py +++ b/versioning/versioning.py @@ -153,16 +153,12 @@ class ModelComparison(object): @cached_property def name(self): - if self.new: - if(hasattr(self.new, 'activity_feed_string')): - return self.new.activity_feed_string - else: - return str(self.new) + obj = self.new if self.new else self.old + + if(hasattr(obj, 'activity_feed_string')): + return obj.activity_feed_string else: - if(hasattr(self.old, 'activity_feed_string')): - return self.old.activity_feed_string - elif str(self.old): - return str(self.old) + return str(obj) @cached_property def items_changed(self):