Don't log database changes when we check a permission

This commit is contained in:
Yohann D'ANELLO 2020-08-14 19:00:57 +02:00
parent 912ce5da2e
commit a43abee00b
1 changed files with 1 additions and 1 deletions

View File

@ -57,9 +57,9 @@ class InstancedPermission:
# Force insertion, no data verification, no trigger
obj._force_save = True
Model.save(obj, force_insert=True)
# We don't want log anything
obj._no_log = True
Model.save(obj, force_insert=True)
ret = self.model.model_class().objects.filter(self.query & Q(pk=0)).exists()
# Delete testing object
obj._force_delete = True