mirror of
				https://gitlab.crans.org/bde/nk20
				synced 2025-11-03 08:58:47 +01:00 
			
		
		
		
	Don't log database changes when we check a permission
This commit is contained in:
		@@ -57,9 +57,9 @@ class InstancedPermission:
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
                    # Force insertion, no data verification, no trigger
 | 
					                    # Force insertion, no data verification, no trigger
 | 
				
			||||||
                    obj._force_save = True
 | 
					                    obj._force_save = True
 | 
				
			||||||
                    Model.save(obj, force_insert=True)
 | 
					 | 
				
			||||||
                    # We don't want log anything
 | 
					                    # We don't want log anything
 | 
				
			||||||
                    obj._no_log = True
 | 
					                    obj._no_log = True
 | 
				
			||||||
 | 
					                    Model.save(obj, force_insert=True)
 | 
				
			||||||
                    ret = self.model.model_class().objects.filter(self.query & Q(pk=0)).exists()
 | 
					                    ret = self.model.model_class().objects.filter(self.query & Q(pk=0)).exists()
 | 
				
			||||||
                    # Delete testing object
 | 
					                    # Delete testing object
 | 
				
			||||||
                    obj._force_delete = True
 | 
					                    obj._force_delete = True
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user