Further minor fixes to versioning

This commit is contained in:
2020-12-27 18:48:45 +00:00
parent 0e656b4c41
commit 72221e46bc
2 changed files with 6 additions and 10 deletions

View File

@@ -609,7 +609,7 @@ class Payment(models.Model, RevisionMixin):
@property @property
def activity_feed_string(self): def activity_feed_string(self):
return str("payment at £{}".format(self.amount)) return str("payment of £{}".format(self.amount))
def validate_url(value): def validate_url(value):

View File

@@ -153,16 +153,12 @@ class ModelComparison(object):
@cached_property @cached_property
def name(self): def name(self):
if self.new: obj = self.new if self.new else self.old
if(hasattr(self.new, 'activity_feed_string')):
return self.new.activity_feed_string if(hasattr(obj, 'activity_feed_string')):
else: return obj.activity_feed_string
return str(self.new)
else: else:
if(hasattr(self.old, 'activity_feed_string')): return str(obj)
return self.old.activity_feed_string
elif str(self.old):
return str(self.old)
@cached_property @cached_property
def items_changed(self): def items_changed(self):