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
def activity_feed_string(self):
return str("payment at £{}".format(self.amount))
return str("payment of £{}".format(self.amount))
def validate_url(value):

View File

@@ -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):