mirror of
https://github.com/logos-co/open-law.git
synced 2025-01-24 13:49:26 +00:00
fix test
This commit is contained in:
parent
65ab48b7da
commit
09f9bba08d
@ -99,15 +99,13 @@ def collection_create(book_id: int, collection_id: int | None = None):
|
|||||||
|
|
||||||
log(log.INFO, "Create collection [%s]. Book: [%s]", collection, book.id)
|
log(log.INFO, "Create collection [%s]. Book: [%s]", collection, book.id)
|
||||||
|
|
||||||
|
collection.save()
|
||||||
# notifications
|
# notifications
|
||||||
if current_user.id != book.owner.id:
|
if current_user.id != book.owner.id:
|
||||||
collection_notification(
|
collection_notification(
|
||||||
m.Notification.Actions.CREATE, collection.id, book.owner.id
|
m.Notification.Actions.CREATE, collection.id, book.owner.id
|
||||||
)
|
)
|
||||||
# -------------
|
# -------------
|
||||||
|
|
||||||
collection.save()
|
|
||||||
|
|
||||||
for access_group in collection.parent.access_groups:
|
for access_group in collection.parent.access_groups:
|
||||||
m.CollectionAccessGroups(
|
m.CollectionAccessGroups(
|
||||||
collection_id=collection.id, access_group_id=access_group.id
|
collection_id=collection.id, access_group_id=access_group.id
|
||||||
|
Loading…
x
Reference in New Issue
Block a user