From 3ed822b9ea4339d8ab096bf6bad02d753d09878a Mon Sep 17 00:00:00 2001 From: Mouse Reeve Date: Thu, 22 Apr 2021 10:28:10 -0700 Subject: [PATCH] Don't erase follows on update --- bookwyrm/models/fields.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/bookwyrm/models/fields.py b/bookwyrm/models/fields.py index 2aefae51..336ee4a1 100644 --- a/bookwyrm/models/fields.py +++ b/bookwyrm/models/fields.py @@ -275,9 +275,12 @@ class ManyToManyField(ActivitypubFieldMixin, models.ManyToManyField): return [i.remote_id for i in value.all()] def field_from_activity(self, value): - items = [] if value is None or value is MISSING: - return [] + return None + if not isinstance(value, list): + # TODO + return None + items = [] for remote_id in value: try: validate_remote_id(remote_id)