From de6147ecfa6b5da176bb6eeb20aa6f808583b4ad Mon Sep 17 00:00:00 2001 From: Mouse Reeve Date: Fri, 4 Dec 2020 08:29:54 -0800 Subject: [PATCH] Ignore many to many activitypub serialization of non-lists --- bookwyrm/activitypub/base_activity.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bookwyrm/activitypub/base_activity.py b/bookwyrm/activitypub/base_activity.py index 786a2aabc..ebc026b99 100644 --- a/bookwyrm/activitypub/base_activity.py +++ b/bookwyrm/activitypub/base_activity.py @@ -151,8 +151,9 @@ class ActivityObject: # add many to many fields for (model_key, values) in many_to_many_fields.items(): - # mention books, mention users - if values == MISSING: + # mention books, mention users, followers + if values == MISSING or not isinstance(values, list): + # user followers is a link to an orderedcollection, skip it continue model_field = getattr(instance, model_key) model = model_field.model