Skip to content
Snippets Groups Projects
Commit 02dcef66 authored by Antoine Lambert's avatar Antoine Lambert
Browse files

admin: Update condition to not run code when building documentation

parent c27d0c72
No related branches found
No related tags found
No related merge requests found
......@@ -3,14 +3,17 @@
# License: GNU Affero General Public License version 3, or any later version
# See top-level LICENSE file for more information
import os
from django.conf import settings
from django.contrib import admin
from django.urls import path as url
from swh.web.config import get_config
# check if admin app for swh-web is enabled to avoid errors with autodoc
if "swh.web.admin" in settings.SWH_DJANGO_APPS:
# prevent code execution when building documentation to avoid errors
# with autodoc processing
if "SWH_DOC_BUILD" not in os.environ:
config = get_config()
oidc_enabled = bool(config["keycloak"]["server_url"])
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment