mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-11-27 03:51:08 +00:00
Fixes logic error in detecting changed fields when serializing
This commit is contained in:
parent
b059cbdd18
commit
ebc0680288
2 changed files with 2 additions and 1 deletions
|
@ -80,7 +80,7 @@ class ActivitypubFieldMixin:
|
|||
return False
|
||||
|
||||
# the field is unchanged
|
||||
if getattr(instance, self.name) == formatted:
|
||||
if hasattr(instance, self.name) and getattr(instance, self.name) == formatted:
|
||||
return False
|
||||
|
||||
setattr(instance, self.name, formatted)
|
||||
|
|
|
@ -21,6 +21,7 @@ from bookwyrm import models
|
|||
|
||||
@patch("bookwyrm.activitystreams.ActivityStream.add_status")
|
||||
@patch("bookwyrm.suggested_users.rerank_user_task.delay")
|
||||
@patch("bookwyrm.suggested_users.remove_user_task.delay")
|
||||
@patch("bookwyrm.suggested_users.rerank_suggestions_task.delay")
|
||||
class BaseActivity(TestCase):
|
||||
"""the super class for model-linked activitypub dataclasses"""
|
||||
|
|
Loading…
Reference in a new issue