forked from mirrors/bookwyrm
Fixes outbox pagination
This commit is contained in:
parent
b41d9440fd
commit
88c23117ff
1 changed files with 4 additions and 1 deletions
|
@ -30,6 +30,7 @@ logger = logging.getLogger(__name__)
|
||||||
PropertyField = namedtuple("PropertyField", ("set_activity_from_field"))
|
PropertyField = namedtuple("PropertyField", ("set_activity_from_field"))
|
||||||
|
|
||||||
|
|
||||||
|
# pylint: disable=invalid-name
|
||||||
def set_activity_from_property_field(activity, obj, field):
|
def set_activity_from_property_field(activity, obj, field):
|
||||||
"""assign a model property value to the activity json"""
|
"""assign a model property value to the activity json"""
|
||||||
activity[field[1]] = getattr(obj, field[0])
|
activity[field[1]] = getattr(obj, field[0])
|
||||||
|
@ -318,7 +319,9 @@ class OrderedCollectionPageMixin(ObjectMixin):
|
||||||
|
|
||||||
remote_id = remote_id or self.remote_id
|
remote_id = remote_id or self.remote_id
|
||||||
if page:
|
if page:
|
||||||
return to_ordered_collection_page(queryset, remote_id, **kwargs)
|
if isinstance(page, list) and len(page) > 0:
|
||||||
|
page = page[0]
|
||||||
|
return to_ordered_collection_page(queryset, remote_id, page=page, **kwargs)
|
||||||
|
|
||||||
if collection_only or not hasattr(self, "activity_serializer"):
|
if collection_only or not hasattr(self, "activity_serializer"):
|
||||||
serializer = activitypub.OrderedCollection
|
serializer = activitypub.OrderedCollection
|
||||||
|
|
Loading…
Reference in a new issue