From 346aa94ead306f32e3b6faefdfe0dd4673e46376 Mon Sep 17 00:00:00 2001 From: Yohann D'ANELLO Date: Mon, 7 Sep 2020 14:57:30 +0200 Subject: [PATCH] Don't trigger signals when we add an object through a permission check --- 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 ae77e1a0..ff348404 100644 --- a/apps/permission/models.py +++ b/apps/permission/models.py @@ -58,7 +58,7 @@ class InstancedPermission: # Force insertion, no data verification, no trigger obj._force_save = True # We don't want to trigger any signal (log, ...) - obj.no_signal = True + 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