Skip to content

Commit

Permalink
Further minor fixes to versioning
Browse files Browse the repository at this point in the history
  • Loading branch information
FreneticScribbler committed Dec 27, 2020
1 parent 0e656b4 commit 72221e4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 deletions.
2 changes: 1 addition & 1 deletion RIGS/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -609,7 +609,7 @@ def __str__(self):

@property
def activity_feed_string(self):
return str("payment at 拢{}".format(self.amount))
return str("payment of 拢{}".format(self.amount))


def validate_url(value):
Expand Down
14 changes: 5 additions & 9 deletions versioning/versioning.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,16 +153,12 @@ def item_changes(self):

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

0 comments on commit 72221e4

Please sign in to comment.