From de7e64932a166a7525a15b18222646b541c72b57 Mon Sep 17 00:00:00 2001 From: Mouse Reeve Date: Thu, 3 Dec 2020 13:14:04 -0800 Subject: [PATCH] Fixes name of book field on status --- bookwyrm/models/status.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/bookwyrm/models/status.py b/bookwyrm/models/status.py index 371a6345..6fa9f995 100644 --- a/bookwyrm/models/status.py +++ b/bookwyrm/models/status.py @@ -145,7 +145,8 @@ class GeneratedNote(Status): class Comment(Status): ''' like a review but without a rating and transient ''' - book = fields.ForeignKey('Edition', on_delete=models.PROTECT) + book = fields.ForeignKey( + 'Edition', on_delete=models.PROTECT, activitypub_field='inReplyToBook') @property def pure_content(self): @@ -160,7 +161,8 @@ class Comment(Status): class Quotation(Status): ''' like a review but without a rating and transient ''' quote = fields.TextField() - book = fields.ForeignKey('Edition', on_delete=models.PROTECT) + book = fields.ForeignKey( + 'Edition', on_delete=models.PROTECT, activitypub_field='inReplyToBook') @property def pure_content(self): @@ -179,7 +181,8 @@ class Quotation(Status): class Review(Status): ''' a book review ''' name = fields.CharField(max_length=255, null=True) - book = fields.ForeignKey('Edition', on_delete=models.PROTECT) + book = fields.ForeignKey( + 'Edition', on_delete=models.PROTECT, activitypub_field='inReplyToBook') rating = fields.IntegerField( default=None, null=True,