Update progress with comments
This commit is contained in:
@ -14,6 +14,7 @@ from .activitypub_mixin import ActivitypubMixin, ActivityMixin
|
||||
from .activitypub_mixin import OrderedCollectionPageMixin
|
||||
from .base_model import BookWyrmModel
|
||||
from .fields import image_serializer
|
||||
from .readthrough import ProgressMode
|
||||
from . import fields
|
||||
|
||||
|
||||
@ -229,6 +230,13 @@ class Comment(Status):
|
||||
"Edition", on_delete=models.PROTECT, activitypub_field="inReplyToBook"
|
||||
)
|
||||
|
||||
# this is it's own field instead of a foreign key to the progress update
|
||||
# so that the update can be deleted without impacting the status
|
||||
progress = models.IntegerField(validators=[MinValueValidator(0)], null=True, blank=True)
|
||||
mode = models.CharField(
|
||||
max_length=3, choices=ProgressMode.choices, default=ProgressMode.PAGE, null=True, blank=True
|
||||
)
|
||||
|
||||
@property
|
||||
def pure_content(self):
|
||||
""" indicate the book in question for mastodon (or w/e) users """
|
||||
|
Reference in New Issue
Block a user