From 45167fe2f064712ce5f5ad9947d3458b41eb0a86 Mon Sep 17 00:00:00 2001 From: Matthias Date: Mon, 15 Nov 2021 07:47:52 +0100 Subject: [PATCH] PEP fixes --- InvenTree/InvenTree/urls.py | 3 +++ .../plugin/samples/integration/test_samples_integration.py | 1 - 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/InvenTree/InvenTree/urls.py b/InvenTree/InvenTree/urls.py index 1584e9f5ab..1347809dd7 100644 --- a/InvenTree/InvenTree/urls.py +++ b/InvenTree/InvenTree/urls.py @@ -124,6 +124,8 @@ translated_javascript_urls = [ # Integration plugin urls integration_urls = [] + + def get_integration_urls(): urls = [] for plugin in settings.INTEGRATION_PLUGINS.values(): @@ -131,6 +133,7 @@ def get_integration_urls(): urls.append(plugin.urlpatterns) return urls + try: if settings.PLUGIN_TESTING or InvenTreeSetting.get_setting('ENABLE_PLUGINS_URL'): integration_urls = get_integration_urls() diff --git a/InvenTree/plugin/samples/integration/test_samples_integration.py b/InvenTree/plugin/samples/integration/test_samples_integration.py index 8e2ef41634..733e443638 100644 --- a/InvenTree/plugin/samples/integration/test_samples_integration.py +++ b/InvenTree/plugin/samples/integration/test_samples_integration.py @@ -2,7 +2,6 @@ from django.test import TestCase from django.contrib.auth import get_user_model -from django.conf import settings class SampleIntegrationPluginTests(TestCase):