Update ordered collection classes to use CollectionItem
This commit is contained in:
parent
98161b9041
commit
31077a9790
3 changed files with 13 additions and 17 deletions
|
@ -32,6 +32,7 @@ class Shelf(OrderedCollectionMixin, BookWyrmModel):
|
|||
)
|
||||
|
||||
activity_serializer = activitypub.Shelf
|
||||
collection_field = "shelf"
|
||||
|
||||
def save(self, *args, **kwargs):
|
||||
""" set the identifier """
|
||||
|
@ -75,9 +76,7 @@ class ShelfBook(CollectionItemMixin, BookWyrmModel):
|
|||
"User", on_delete=models.PROTECT, activitypub_field="actor"
|
||||
)
|
||||
|
||||
activity_serializer = activitypub.Add
|
||||
object_field = "book"
|
||||
collection_field = "shelf"
|
||||
activity_serializer = activitypub.ShelfItem
|
||||
|
||||
def save(self, *args, **kwargs):
|
||||
if not self.user:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue