All transactions are now atomic
This commit is contained in:
parent
860c7b50e5
commit
9b090a145c
15 changed files with 61 additions and 20 deletions
|
|
@ -199,6 +199,7 @@ class Permission(models.Model):
|
|||
if self.field and self.type not in {'view', 'change'}:
|
||||
raise ValidationError(_("Specifying field applies only to view and change permission types."))
|
||||
|
||||
@transaction.atomic
|
||||
def save(self, **kwargs):
|
||||
self.full_clean()
|
||||
super().save()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue