Make get_rank() a regular method

It doesn't act like a property, and we have edition_rank as a proper
property anyway
This commit is contained in:
Joel Bradshaw 2021-01-13 18:43:05 -08:00
parent ec2a43faa5
commit 0b703a252b

View file

@ -178,7 +178,6 @@ class Edition(Book):
activity_serializer = activitypub.Edition activity_serializer = activitypub.Edition
name_field = 'title' name_field = 'title'
@property
def get_rank(self): def get_rank(self):
''' calculate how complete the data is on this edition ''' ''' calculate how complete the data is on this edition '''
if self.parent_work and self.parent_work.default_edition == self: if self.parent_work and self.parent_work.default_edition == self:
@ -204,7 +203,7 @@ class Edition(Book):
self.isbn_13 = isbn_10_to_13(self.isbn_10) self.isbn_13 = isbn_10_to_13(self.isbn_10)
# set rank # set rank
self.edition_rank = self.get_rank self.edition_rank = self.get_rank()
return super().save(*args, **kwargs) return super().save(*args, **kwargs)