lint
Signed-off-by: Marc 'risson' Schmitt <marc.schmitt@risson.space>
This commit is contained in:
parent
d0a8919fc0
commit
742dc12656
|
@ -19,6 +19,7 @@ class TestUsersAvatars(APITestCase):
|
|||
self.user = User.objects.create(username="test-user")
|
||||
|
||||
def set_avatar_mode(self, mode: str):
|
||||
"""Set the avatar mode on the current tenant."""
|
||||
tenant = get_current_tenant()
|
||||
tenant.avatars = mode
|
||||
tenant.save()
|
||||
|
|
|
@ -11,7 +11,6 @@ from rest_framework.serializers import BaseSerializer
|
|||
from structlog import get_logger
|
||||
|
||||
from authentik.core.models import ExpiringModel
|
||||
from authentik.lib.config import CONFIG
|
||||
from authentik.lib.models import SerializerModel
|
||||
from authentik.lib.utils.http import get_client_ip
|
||||
from authentik.policies.models import Policy
|
||||
|
|
|
@ -5,7 +5,7 @@ from django.db.models.signals import post_migrate
|
|||
from authentik.blueprints.apps import ManagedAppConfig
|
||||
|
||||
|
||||
def reconcile_default_tenant(using=DEFAULT_DB_ALIAS, *args, **kwargs):
|
||||
def reconcile_default_tenant(*args, using=DEFAULT_DB_ALIAS, **kwargs):
|
||||
"""Make sure default tenant exists"""
|
||||
from authentik.tenants.models import Tenant
|
||||
|
||||
|
@ -24,5 +24,6 @@ class AuthentikTenantsConfig(ManagedAppConfig):
|
|||
default = True
|
||||
|
||||
def reconcile_default_tenant(self):
|
||||
"""Make sure default tenant exists, especially after a migration"""
|
||||
reconcile_default_tenant()
|
||||
post_migrate.connect(reconcile_default_tenant)
|
||||
|
|
Reference in New Issue