From 692aa0836478f99edaf080ec58e02be2b7f5f8c3 Mon Sep 17 00:00:00 2001 From: Joel Bradshaw Date: Wed, 25 Nov 2020 23:11:30 -0800 Subject: [PATCH] Remove unneeded class, wrap line --- bookwyrm/models/status.py | 32 ++++---------------------------- 1 file changed, 4 insertions(+), 28 deletions(-) diff --git a/bookwyrm/models/status.py b/bookwyrm/models/status.py index 934a88387..406de2408 100644 --- a/bookwyrm/models/status.py +++ b/bookwyrm/models/status.py @@ -201,33 +201,6 @@ class Quotation(Status): activity_serializer = activitypub.Quotation pure_activity_serializer = activitypub.Note -#class Progress(Status): -# ''' an update of where a user is in a book, using page number or % ''' -# -# progress = models.IntegerField() -# mode = models.TextChoices(max_length=3, choices=ProgessMode.choices, default=ProgressMode.PAGE) -# book = models.ForeignKey('Edition', on_delete=models.PROTECT) -# -# @property -# def ap_pure_content(self): -# ''' indicate the book in question for mastodon (or w/e) users ''' -# if self.mode == ProgressMode.PAGE: -# return 'on page %d of %d in "%s"' % ( -# self.progress, -# self.book.pages, -# self.book.remote_id, -# self.book.title, -# ) -# else: -# return '%d%% of the way through "%s"' % ( -# self.progress, -# self.book.remote_id, -# self.book.title, -# ) -# -# activity_serializer = activitypub.Progress -# pure_activity_serializer = activitypub.Note - class Review(Status): ''' a book review ''' name = models.CharField(max_length=255, null=True) @@ -338,7 +311,10 @@ class ProgressUpdate(BookWyrmModel): user = models.ForeignKey('User', on_delete=models.PROTECT) readthrough = models.ForeignKey('ReadThrough', on_delete=models.PROTECT) progress = models.IntegerField() - mode = models.CharField(max_length=3, choices=ProgressMode.choices, default=ProgressMode.PAGE) + mode = models.CharField( + max_length=3, + choices=ProgressMode.choices, + default=ProgressMode.PAGE) def save(self, *args, **kwargs): ''' update user active time '''