From a7c5c853f210c81fc27fad8b584d58e959e66ba8 Mon Sep 17 00:00:00 2001 From: Jacob Walls Date: Fri, 13 Dec 2024 17:01:43 -0500 Subject: [PATCH] Use same guard for "last" project as project-level urls.py #11660 This check sniffs for whether this urls.py is the one being run as a project (not included by any further apps). For core arches, this would only be true if running core arches without a project. This was failing on a Django exception inside i18n_patterns(). This check is the same check that we're using in project-level settings.py --- arches/urls.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arches/urls.py b/arches/urls.py index e4ba6cf8c40..6423f379ed9 100644 --- a/arches/urls.py +++ b/arches/urls.py @@ -736,7 +736,7 @@ # This must be included in core to keep webpack happy, but cannot be appended when running a project. # See https://github.com/archesproject/arches/pull/10754 -if settings.APP_NAME == "Arches": +if settings.ROOT_URLCONF == __name__: if settings.SHOW_LANGUAGE_SWITCH is True: urlpatterns = i18n_patterns(*urlpatterns)