From a43abee00b57db6afb63bada27d6ed4d3b3e4521 Mon Sep 17 00:00:00 2001 From: Yohann D'ANELLO Date: Fri, 14 Aug 2020 19:00:57 +0200 Subject: [PATCH] Don't log database changes when we check a permission --- apps/permission/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/permission/models.py b/apps/permission/models.py index 9136d30d..3d395a75 100644 --- a/apps/permission/models.py +++ b/apps/permission/models.py @@ -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