Skip to content

Commit

Permalink
Use same guard for "last" project as project-level urls.py #11660
Browse files Browse the repository at this point in the history
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
  • Loading branch information
jacobtylerwalls committed Dec 13, 2024
1 parent e46e0ca commit a7c5c85
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arches/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit a7c5c85

Please sign in to comment.