Signed-off-by: Marc 'risson' Schmitt <marc.schmitt@risson.space>
This commit is contained in:
Marc 'risson' Schmitt
2025-06-12 14:18:33 +02:00
parent f254b8cf8c
commit e354e877ea
4 changed files with 11 additions and 6 deletions

View File

@ -113,8 +113,12 @@ class ManagedAppConfig(AppConfig):
"""
from django_tenants.utils import get_public_schema_name, schema_context
with schema_context(get_public_schema_name()):
self._reconcile(self.RECONCILE_GLOBAL_CATEGORY)
try:
with schema_context(get_public_schema_name()):
self._reconcile(self.RECONCILE_GLOBAL_CATEGORY)
except (DatabaseError, ProgrammingError, InternalError) as exc:
self.logger.debug("Failed to access database to run reconcile", exc=exc)
return
class AuthentikBlueprintsConfig(ManagedAppConfig):

View File

@ -15,6 +15,7 @@ class AuthentikProviderProxyConfig(ManagedAppConfig):
def proxy_set_defaults(self):
from authentik.providers.proxy.models import ProxyProvider
# TODO: figure out if this can be in pre_save + post_save signals
for provider in ProxyProvider.objects.all():
provider.set_oauth_defaults()
provider.save()

View File

@ -50,12 +50,12 @@ class PytestTestRunner(DiscoverRunner): # pragma: no cover
CONFIG.set("error_reporting.send_pii", True)
sentry_init()
apps.get_app_config("authentik_tasks").use_test_broker()
pre_startup.send(sender=self, mode="test")
startup.send(sender=self, mode="test")
post_startup.send(sender=self, mode="test")
apps.get_app_config("authentik_tasks").use_test_broker()
@classmethod
def add_arguments(cls, parser: ArgumentParser):
"""Add more pytest-specific arguments"""

View File

@ -65,8 +65,8 @@ class TaskViewSet(
"queue_name",
"actor_name",
"state",
"rel_obj_app_label",
"rel_obj_model",
"rel_obj_content_type__app_label",
"rel_obj_content_type__model",
"rel_obj_id",
"_uid",
"aggregated_status",