Don't trigger signals when we add an object through a permission check
This commit is contained in:
parent
353416618a
commit
78586b9343
6 changed files with 25 additions and 23 deletions
|
|
@ -57,8 +57,8 @@ class InstancedPermission:
|
|||
|
||||
# Force insertion, no data verification, no trigger
|
||||
obj._force_save = True
|
||||
# We don't want log anything
|
||||
obj._no_log = True
|
||||
# We don't want to trigger any signal (log, ...)
|
||||
obj.no_signal = True
|
||||
Model.save(obj, force_insert=True)
|
||||
ret = self.model.model_class().objects.filter(self.query & Q(pk=0)).exists()
|
||||
# Delete testing object
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue