|
|
|
@ -263,6 +263,7 @@ def handle_shared_with_changes(sender, instance, action, pk_set, **kwargs): |
|
|
|
# print(f'm2m changed = {pk_set}') |
|
|
|
# print(f'm2m changed = {pk_set}') |
|
|
|
users = User.objects.filter(id__in=pk_set) |
|
|
|
users = User.objects.filter(id__in=pk_set) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
with transaction.atomic(): |
|
|
|
if action == "post_add": |
|
|
|
if action == "post_add": |
|
|
|
instance.create_access_log(users, 'SHARED_ACCESS') |
|
|
|
instance.create_access_log(users, 'SHARED_ACCESS') |
|
|
|
elif action == "post_remove": |
|
|
|
elif action == "post_remove": |
|
|
|
|