From 602d340c90fec8a9c8199e698591b0ecd86c1b7e Mon Sep 17 00:00:00 2001 From: Marc 'risson' Schmitt Date: Thu, 11 Jan 2024 14:59:43 +0100 Subject: [PATCH] Revert "try running tenant save in a transaction" This reverts commit da6dec5a610620b1b3e1398cfb957bbae710aae1. --- authentik/tenants/models.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/authentik/tenants/models.py b/authentik/tenants/models.py index 53a589312..2fe1181dc 100644 --- a/authentik/tenants/models.py +++ b/authentik/tenants/models.py @@ -4,7 +4,7 @@ from uuid import uuid4 from django.apps import apps from django.core.exceptions import ValidationError -from django.db import models, transaction +from django.db import models from django.db.utils import IntegrityError from django.dispatch import receiver from django.utils.translation import gettext_lazy as _ @@ -85,8 +85,7 @@ class Tenant(TenantMixin, SerializerModel): def save(self, *args, **kwargs): if self.schema_name == "template": raise IntegrityError("Cannot create schema named template") - with transaction.atomic(): - super().save(*args, **kwargs) + super().save(*args, **kwargs) def delete(self, *args, **kwargs): if self.schema_name in ("public", "template"):