Use CollectionItem objects

This commit is contained in:
Mouse Reeve
2021-04-08 14:16:34 -07:00
parent 6617cede37
commit 98161b9041
3 changed files with 29 additions and 8 deletions

View File

@ -4,7 +4,7 @@ from typing import List
from django.apps import apps
from .base_activity import ActivityObject, Signature, resolve_remote_id
from .book import Edition
from .ordered_collection import CollectionItem
@dataclass(init=False)
@ -141,12 +141,9 @@ class Reject(Verb):
class Add(Verb):
"""Add activity """
target: str
object: Edition
target: ActivityObject
object: CollectionItem
type: str = "Add"
notes: str = None
order: int = 0
approved: bool = True
def action(self):
""" add obj to collection """
@ -159,10 +156,9 @@ class Add(Verb):
@dataclass(init=False)
class Remove(Verb):
class Remove(Add):
"""Remove activity """
target: ActivityObject
type: str = "Remove"
def action(self):