From 5b244a04f9b76c784cac4feb6a863e4756e1ae17 Mon Sep 17 00:00:00 2001 From: Jens L Date: Sun, 3 Dec 2023 21:47:27 +0200 Subject: [PATCH] root: don't show warning when app has no URLs to import (#7765) --- authentik/api/v3/urls.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/authentik/api/v3/urls.py b/authentik/api/v3/urls.py index f22a80536..a7e610efa 100644 --- a/authentik/api/v3/urls.py +++ b/authentik/api/v3/urls.py @@ -21,7 +21,9 @@ _other_urls = [] for _authentik_app in get_apps(): try: api_urls = import_module(f"{_authentik_app.name}.urls") - except (ModuleNotFoundError, ImportError) as exc: + except ModuleNotFoundError: + continue + except ImportError as exc: LOGGER.warning("Could not import app's URLs", app_name=_authentik_app.name, exc=exc) continue if not hasattr(api_urls, "api_urlpatterns"):