From 88a3eed67ec0260db20881714dbb97e96914cc57 Mon Sep 17 00:00:00 2001 From: "gcp-cherry-pick-bot[bot]" <98988430+gcp-cherry-pick-bot[bot]@users.noreply.github.com> Date: Tue, 19 Dec 2023 18:30:49 +0100 Subject: [PATCH] root: don't show warning when app has no URLs to import (cherry-pick #7765) (#7935) root: don't show warning when app has no URLs to import (#7765) Co-authored-by: Jens L --- 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"):