|
|
|
|
@ -257,8 +257,8 @@ def process_foreign_key_changes(sender, instance, **kwargs): |
|
|
|
|
def delete_data_access_if_necessary(sender, instance, **kwargs): |
|
|
|
|
if not isinstance(instance, BaseModel): |
|
|
|
|
return |
|
|
|
|
if hasattr(instance, 'id'): |
|
|
|
|
DataAccess.objects.filter(model_id=instance.id).delete() |
|
|
|
|
# if hasattr(instance, 'id'): |
|
|
|
|
# DataAccess.objects.filter(model_id=instance.id).delete() |
|
|
|
|
|
|
|
|
|
@receiver(m2m_changed, sender=DataAccess.shared_with.through) |
|
|
|
|
def handle_shared_with_changes(sender, instance, action, pk_set, **kwargs): |
|
|
|
|
|