mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-12-23 08:36:32 +00:00
fixes ordered collection serializations
This commit is contained in:
parent
dbe9431d5a
commit
cbccdea468
3 changed files with 4 additions and 3 deletions
|
@ -329,7 +329,8 @@ class OrderedCollectionMixin(OrderedCollectionPageMixin):
|
||||||
|
|
||||||
def to_activity(self, **kwargs):
|
def to_activity(self, **kwargs):
|
||||||
''' an ordered collection of the specified model queryset '''
|
''' an ordered collection of the specified model queryset '''
|
||||||
return self.to_ordered_collection(self.collection_queryset, **kwargs).serialize()
|
return self.to_ordered_collection(
|
||||||
|
self.collection_queryset, **kwargs).serialize()
|
||||||
|
|
||||||
|
|
||||||
class CollectionItemMixin(ActivitypubMixin):
|
class CollectionItemMixin(ActivitypubMixin):
|
||||||
|
|
|
@ -155,7 +155,7 @@ class Status(OrderedCollectionPageMixin, BookWyrmModel):
|
||||||
remote_id='%s/replies' % self.remote_id,
|
remote_id='%s/replies' % self.remote_id,
|
||||||
collection_only=True,
|
collection_only=True,
|
||||||
**kwargs
|
**kwargs
|
||||||
)
|
).serialize()
|
||||||
|
|
||||||
def to_activity_dataclass(self, pure=False):# pylint: disable=arguments-differ
|
def to_activity_dataclass(self, pure=False):# pylint: disable=arguments-differ
|
||||||
''' return tombstone if the status is deleted '''
|
''' return tombstone if the status is deleted '''
|
||||||
|
|
|
@ -131,7 +131,7 @@ class User(OrderedCollectionPageMixin, AbstractUser):
|
||||||
privacy__in=['public', 'unlisted'],
|
privacy__in=['public', 'unlisted'],
|
||||||
).select_subclasses().order_by('-published_date')
|
).select_subclasses().order_by('-published_date')
|
||||||
return self.to_ordered_collection(queryset, \
|
return self.to_ordered_collection(queryset, \
|
||||||
collection_only=True, remote_id=self.outbox, **kwargs)
|
collection_only=True, remote_id=self.outbox, **kwargs).serialize()
|
||||||
|
|
||||||
def to_following_activity(self, **kwargs):
|
def to_following_activity(self, **kwargs):
|
||||||
''' activitypub following list '''
|
''' activitypub following list '''
|
||||||
|
|
Loading…
Reference in a new issue