From 6147b079d17b26251e23e10984a6d33d6d2b7478 Mon Sep 17 00:00:00 2001 From: Matthias Date: Mon, 18 Oct 2021 23:03:00 +0200 Subject: [PATCH] safe url loading --- InvenTree/InvenTree/urls.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/InvenTree/InvenTree/urls.py b/InvenTree/InvenTree/urls.py index 8b987d70c5..e181d130fa 100644 --- a/InvenTree/InvenTree/urls.py +++ b/InvenTree/InvenTree/urls.py @@ -127,7 +127,12 @@ translated_javascript_urls = [ # Integration plugin urls interation_urls = [] -if settings.TESTING or InvenTreeSetting.get_setting('ENABLE_PLUGINS_URL'): +plugin_url_enabled = False +try: + plugin_url_enabled = InvenTreeSetting.get_setting('ENABLE_PLUGINS_URL') +except Exception as _e: + print(_e) +if settings.TESTING or plugin_url_enabled: for plugin in settings.INTEGRATION_PLUGINS.values(): if plugin.mixin_enabled('urls'): interation_urls.append(plugin.urlpatterns)