mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2025-01-01 21:08:42 +00:00
Ignore many to many activitypub serialization of non-lists
This commit is contained in:
parent
ae8d0e1974
commit
de6147ecfa
1 changed files with 3 additions and 2 deletions
|
@ -151,8 +151,9 @@ class ActivityObject:
|
||||||
|
|
||||||
# add many to many fields
|
# add many to many fields
|
||||||
for (model_key, values) in many_to_many_fields.items():
|
for (model_key, values) in many_to_many_fields.items():
|
||||||
# mention books, mention users
|
# mention books, mention users, followers
|
||||||
if values == MISSING:
|
if values == MISSING or not isinstance(values, list):
|
||||||
|
# user followers is a link to an orderedcollection, skip it
|
||||||
continue
|
continue
|
||||||
model_field = getattr(instance, model_key)
|
model_field = getattr(instance, model_key)
|
||||||
model = model_field.model
|
model = model_field.model
|
||||||
|
|
Loading…
Reference in a new issue