mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
safe url loading
This commit is contained in:
parent
b36a1d47e1
commit
6147b079d1
@ -127,7 +127,12 @@ translated_javascript_urls = [
|
|||||||
|
|
||||||
# Integration plugin urls
|
# Integration plugin urls
|
||||||
interation_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():
|
for plugin in settings.INTEGRATION_PLUGINS.values():
|
||||||
if plugin.mixin_enabled('urls'):
|
if plugin.mixin_enabled('urls'):
|
||||||
interation_urls.append(plugin.urlpatterns)
|
interation_urls.append(plugin.urlpatterns)
|
||||||
|
Loading…
Reference in New Issue
Block a user