From bfc421c50b67400ae99de770678bbf5f4f33be11 Mon Sep 17 00:00:00 2001 From: eeintech Date: Thu, 15 Jul 2021 14:52:33 -0400 Subject: [PATCH 01/12] Cleaner part details --- InvenTree/part/templates/part/part_base.html | 121 +++++++++++-------- 1 file changed, 72 insertions(+), 49 deletions(-) diff --git a/InvenTree/part/templates/part/part_base.html b/InvenTree/part/templates/part/part_base.html index 9fe6c7b486..073f3eeff9 100644 --- a/InvenTree/part/templates/part/part_base.html +++ b/InvenTree/part/templates/part/part_base.html @@ -18,19 +18,14 @@

{{ part.full_name }} +

+

+

+ {% if user.is_staff and roles.part.change %} {% endif %} - {% if not part.active %} -
- {% trans 'Inactive' %} -
- {% endif %} -

- {% if part.description %} -

{{ part.description }}

- {% endif %} -

+

{% if part.virtual %} @@ -54,6 +49,13 @@ {% endif %}
+ + {% if not part.active %} +
+ {% trans 'Inactive' %} +
+ {% endif %} +

@@ -122,40 +124,6 @@
{% endif %}
- - - {% if part.keywords %} - - - - - - {% endif %} - {% if part.link %} - - - - - - {% endif %} - - - - - - {% if part.trackable and part.getLatestSerialNumber %} - - - - - - {% endif %} -
{% trans "Keywords" %}{{ part.keywords }}
{% trans "External Link" %}{{ part.link }}
{% trans "Creation Date" %} - {{ part.creation_date }} - {% if part.creation_user %} - {{ part.creation_user }} - {% endif %} -
{% trans "Latest Serial Number" %}{{ part.getLatestSerialNumber }}{% include "clip.html"%}
@@ -174,14 +142,69 @@
- +
+ {% if part.description %} + + + + {% endif %} + {% if part.revision %} + + + + + + {% endif %} + {% if part.keywords %} + + + + + + {% endif %} + {% if part.link %} + + + + + + {% endif %} + + + + + + {% if part.trackable and part.getLatestSerialNumber %} + + + + + + {% endif %} + {% if part.default_location %} + + + + + + {% endif %} + {% if part.default_supplier %} + + + + + + {% endif %} - - + + From f938e722b97fb9cb58293c979c2872e493d3e386 Mon Sep 17 00:00:00 2001 From: eeintech Date: Fri, 16 Jul 2021 12:08:26 -0400 Subject: [PATCH 02/12] Another shot at it! --- InvenTree/part/templates/part/part_base.html | 501 ++++++++++--------- 1 file changed, 253 insertions(+), 248 deletions(-) diff --git a/InvenTree/part/templates/part/part_base.html b/InvenTree/part/templates/part/part_base.html index 073f3eeff9..3c518df780 100644 --- a/InvenTree/part/templates/part/part_base.html +++ b/InvenTree/part/templates/part/part_base.html @@ -10,262 +10,267 @@ {% block content %} -
+
+ +

{{ part.full_name }}

+
+
+
+ {% include "part/part_thumb.html" %} +
+

+

+ + {% if user.is_staff and roles.part.change %} +   + {% endif %} + +
+ {% if part.is_template %} + + {% endif %} + {% if part.assembly %} + + {% endif %} + {% if part.component %} + + {% endif %} + {% if part.trackable %} + + {% endif %} + {% if part.purchaseable %} + + {% endif %} + {% if part.salable %} + + {% endif %} +
+ + {% if not part.active %} +   +
+ + {% trans 'Inactive' %} +
+ {% endif %} + + {% if part.virtual and part.active %} +   +
+ + {% trans 'Virtual' %} +
+ {% endif %} +

+

-
-
- {% include "part/part_thumb.html" %} -
-

- {{ part.full_name }} -

-

-

- - {% if user.is_staff and roles.part.change %} - - {% endif %} - -
- {% if part.virtual %} - +
+ + + {% if barcodes %} + + {% endif %} - {% if part.is_template %} - - {% endif %} - {% if part.assembly %} - - {% endif %} - {% if part.component %} - - {% endif %} - {% if part.trackable %} - + {% if part.active %} + + {% if roles.stock.change %} + {% endif %} {% if part.purchaseable %} - - {% endif %} - {% if part.salable %} - - {% endif %} -
- - {% if not part.active %} -
- {% trans 'Inactive' %} -
- {% endif %} -

-

- -
- - - {% if barcodes %} - - - {% endif %} - {% if part.active %} - - {% if roles.stock.change %} -
- - -
- {% endif %} - {% if part.purchaseable %} - {% if roles.purchase_order.add %} - - {% endif %} - {% endif %} - {% endif %} - - {% if roles.part.add or roles.part.change or roles.part.delete %} -
- - -
- {% endif %} -
-
-
- -
- {% if part.virtual %} -
- {% trans "This is a virtual part" %} -
- {% endif %} - {% if part.variant_of %} -
- {% object_link 'part-detail' part.variant_of.id part.variant_of.full_name as link %} - {% blocktrans %}This part is a variant of {{link}}{% endblocktrans %} -
- {% endif %} -
-
-
-
{% trans "Description" %}{{ part.description }}{% include "clip.html"%}
{% trans "Revision" %}{{ part.revision }}{% include "clip.html"%}
{% trans "Keywords" %}{{ part.keywords }}{% include "clip.html"%}
{% trans "External Link" %}{{ part.link }}{% include "clip.html"%}
{% trans "Creation Date" %} + {{ part.creation_date }} + {% if part.creation_user %} + {{ part.creation_user }} + {% endif %} +
{% trans "Latest Serial Number" %}{{ part.getLatestSerialNumber }}{% include "clip.html"%}
{% trans "Default Location" %}{{ part.default_location }}
{% trans "Default Supplier" %}{{ part.default_supplier }}
-

{% trans "Available Stock" %}

-

{% decimal available %}{% if part.units %} {{ part.units }}{% endif %}

{% trans "Available Stock" %}{% decimal available %}{% if part.units %} {{ part.units }}{% endif %}
- - {% if part.description %} - - - - {% endif %} - {% if part.revision %} - - - - - - {% endif %} - {% if part.keywords %} - - - - - - {% endif %} - {% if part.link %} - - - - - - {% endif %} - - - - - - {% if part.trackable and part.getLatestSerialNumber %} - - - - - - {% endif %} - {% if part.default_location %} - - - - - - {% endif %} - {% if part.default_supplier %} - - - - - - {% endif %} - - - - - - - - - - - {% if on_order > 0 %} - - - - - - {% endif %} - {% if required_build_order_quantity > 0 %} - - - - - {% endif %} - {% if required_sales_order_quantity > 0 %} - - - - - {% endif %} - {% if allocated > 0 %} - - - - - - {% endif %} + {% endif %} + {% endif %} + + {% if roles.part.add or roles.part.change or roles.part.delete %} +
+ + +
+ {% endif %} + + + +
+ {% if part.variant_of %} +
+ {% object_link 'part-detail' part.variant_of.id part.variant_of.full_name as link %} + {% blocktrans %}This part is a variant of {{link}}{% endblocktrans %} +
+ {% endif %} +
+ +
+
{% trans "Description" %}{{ part.description }}{% include "clip.html"%}
{% trans "Revision" %}{{ part.revision }}{% include "clip.html"%}
{% trans "Keywords" %}{{ part.keywords }}{% include "clip.html"%}
{% trans "External Link" %}{{ part.link }}{% include "clip.html"%}
{% trans "Creation Date" %} - {{ part.creation_date }} - {% if part.creation_user %} - {{ part.creation_user }} {% endif %} -
{% trans "Latest Serial Number" %}{{ part.getLatestSerialNumber }}{% include "clip.html"%}
{% trans "Default Location" %}{{ part.default_location }}
{% trans "Default Supplier" %}{{ part.default_supplier }}
{% trans "Available Stock" %}{% decimal available %}{% if part.units %} {{ part.units }}{% endif %}
{% trans "In Stock" %}{% include "part/stock_count.html" %}
{% trans "On Order" %}{% decimal on_order %}
{% trans "Required for Build Orders" %}{% decimal required_build_order_quantity %} -
{% trans "Required for Sales Orders" %}{% decimal required_sales_order_quantity %} -
{% trans "Allocated to Orders" %}{% decimal allocated %}
+ + + + + + + + + + + + {% if on_order > 0 %} + + + + + + {% endif %} + {% if required_build_order_quantity > 0 %} + + + + + {% endif %} + {% if required_sales_order_quantity > 0 %} + + + + + {% endif %} + {% if allocated > 0 %} + + + + + + {% endif %} - {% if not part.is_template %} - {% if part.assembly %} - - - - - - - - - - {% if quantity_being_built > 0 %} - - - - - - {% endif %} - {% endif %} + {% if not part.is_template %} + {% if part.assembly %} + + + + + + + + + + {% if quantity_being_built > 0 %} + + + + + + {% endif %} + {% endif %} + {% endif %} +

{% trans "Available Stock" %}

{% decimal available %}{% if part.units %} {{ part.units }}{% endif %}

{% trans "In Stock" %}{% include "part/stock_count.html" %}
{% trans "On Order" %}{% decimal on_order %}
{% trans "Required for Build Orders" %}{% decimal required_build_order_quantity %} +
{% trans "Required for Sales Orders" %}{% decimal required_sales_order_quantity %} +
{% trans "Allocated to Orders" %}{% decimal allocated %}
- {% trans "Build Status" %} -
{% trans "Can Build" %}{% decimal part.can_build %}
{% trans "Building" %}{% decimal quantity_being_built %}

+

{% trans "Build Status" %}

+
{% trans "Can Build" %}{% decimal part.can_build %}
{% trans "Building" %}{% decimal quantity_being_built %}
+
+ + + + + + + {% if part.description %} + + + {% endif %} -
{% trans "Description" %}{{ part.description }}{% include "clip.html"%}
- - - + {% if part.revision %} + + + {% trans "Revision" %} + {{ part.revision }}{% include "clip.html"%} + + {% endif %} + {% if part.keywords %} + + + {% trans "Keywords" %} + {{ part.keywords }}{% include "clip.html"%} + + {% endif %} + {% if part.link %} + + + {% trans "External Link" %} + {{ part.link }}{% include "clip.html"%} + + {% endif %} + + + {% trans "Creation Date" %} + + {{ part.creation_date }} + {% if part.creation_user %} + {{ part.creation_user }} + {% endif %} + + + {% if part.trackable and part.getLatestSerialNumber %} + + + {% trans "Latest Serial Number" %} + {{ part.getLatestSerialNumber }}{% include "clip.html"%} + + {% endif %} + {% if part.default_location %} + + + {% trans "Default Location" %} + {{ part.default_location }} + + {% endif %} + {% if part.default_supplier %} + + + {% trans "Default Supplier" %} + {{ part.default_supplier }} + + {% endif %} + {% block page_content %} From 13898d6687a71d97fa984017b50052165965cda2 Mon Sep 17 00:00:00 2001 From: Oliver Date: Fri, 30 Jul 2021 11:51:06 +1000 Subject: [PATCH 03/12] Publish on tags also --- .github/workflows/docker_publish.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/docker_publish.yaml b/.github/workflows/docker_publish.yaml index 53ec505003..1509991146 100644 --- a/.github/workflows/docker_publish.yaml +++ b/.github/workflows/docker_publish.yaml @@ -5,6 +5,7 @@ name: Docker Publish on: release: types: [published] + tags: [1-9]+.[0-9]+.[0-9]+ jobs: publish_image: From 1d19393442b94f09063f150491df42ae9b7020fb Mon Sep 17 00:00:00 2001 From: Oliver Date: Fri, 30 Jul 2021 12:42:03 +1000 Subject: [PATCH 04/12] Revert "Publish on tags also" --- .github/workflows/docker_publish.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/docker_publish.yaml b/.github/workflows/docker_publish.yaml index 1509991146..53ec505003 100644 --- a/.github/workflows/docker_publish.yaml +++ b/.github/workflows/docker_publish.yaml @@ -5,7 +5,6 @@ name: Docker Publish on: release: types: [published] - tags: [1-9]+.[0-9]+.[0-9]+ jobs: publish_image: From 634e5e0da6b1ca2eae0496f5298e2255a954e6d5 Mon Sep 17 00:00:00 2001 From: eeintech Date: Fri, 30 Jul 2021 14:55:12 -0400 Subject: [PATCH 05/12] Added toggle for part details Added persistence for page refresh or new part page --- InvenTree/part/templates/part/part_base.html | 184 +++++++++++++------ 1 file changed, 123 insertions(+), 61 deletions(-) diff --git a/InvenTree/part/templates/part/part_base.html b/InvenTree/part/templates/part/part_base.html index 53444e4f8e..5191399f0a 100644 --- a/InvenTree/part/templates/part/part_base.html +++ b/InvenTree/part/templates/part/part_base.html @@ -209,68 +209,92 @@ - - - - - {% if part.description %} - - - - {% endif %} - {% if part.revision %} - - - - - - {% endif %} - {% if part.keywords %} - - - - - - {% endif %} - {% if part.link %} - - - - - - {% endif %} - - - - + + + + + + + + + + {% if part.revision %} + + + + + + {% endif %} + {% if part.keywords %} + + + + + + {% endif %} + {% if part.link %} + + + + + + {% endif %} + + + + + + {% if part.trackable and part.getLatestSerialNumber %} + + + + + + {% endif %} + {% if part.default_location %} + + + + + + {% endif %} + {% if part.default_supplier %} + + + + + + {% endif %} +
{% trans "Description" %}{{ part.description }}{% include "clip.html"%}
{% trans "Revision" %}{{ part.revision }}{% include "clip.html"%}
{% trans "Keywords" %}{{ part.keywords }}{% include "clip.html"%}
{% trans "External Link" %}{{ part.link }}{% include "clip.html"%}
{% trans "Creation Date" %} - {{ part.creation_date }} - {% if part.creation_user %} - {{ part.creation_user }} + +

+ + +

+ +
+
+ + + + {% if part.IPN %} + + + + + {% endif %} - - - {% if part.trackable and part.getLatestSerialNumber %} - - - - - - {% endif %} - {% if part.default_location %} - - - - - - {% endif %} - {% if part.default_supplier %} - - - - - - {% endif %} -
{% trans "IPN" %}{{ part.IPN }}{% include "clip.html"%}
{% trans "Latest Serial Number" %}{{ part.getLatestSerialNumber }}{% include "clip.html"%}
{% trans "Default Location" %}{{ part.default_location }}
{% trans "Default Supplier" %}{{ part.default_supplier }}
+
{% trans "Name" %}{{ part.name }}{% include "clip.html"%}
{% trans "Description" %}{{ part.description }}{% include "clip.html"%}
{% trans "Revision" %}{{ part.revision }}{% include "clip.html"%}
{% trans "Keywords" %}{{ part.keywords }}{% include "clip.html"%}
{% trans "External Link" %}{{ part.link }}{% include "clip.html"%}
{% trans "Creation Date" %} + {{ part.creation_date }} + {% if part.creation_user %} + {{ part.creation_user }} + {% endif %} +
{% trans "Latest Serial Number" %}{{ part.getLatestSerialNumber }}{% include "clip.html"%}
{% trans "Default Location" %}{{ part.default_location }}
{% trans "Default Supplier" %}{{ part.default_supplier }}
+ + + + {% block page_content %} @@ -478,4 +502,42 @@ }); {% endif %} + $("#toggle-part-details").click(function() { + if (this.value == 'show') { + this.innerHTML = ' {% trans "Hide Part Details" %}'; + this.value = 'hide'; + // Store state of part details section + localStorage.setItem("part-details-show", true); + } else { + this.innerHTML = ' {% trans "Show Part Details" %}'; + this.value = 'show'; + // Store state of part details section + localStorage.setItem("part-details-show", false); + } + }); + + // Load part details section + window.onload = function() { + details_show = localStorage.getItem("part-details-show") + + if (details_show === 'true') { + console.log(details_show) + // Get collapsible details section + details = document.getElementById('collapsible-part-details'); + // Add "show" class + details.classList.add("in"); + // Get toggle + toggle = document.getElementById('toggle-part-details'); + // Change state of toggle + toggle.innerHTML = ' {% trans "Hide Part Details" %}'; + toggle.value = 'hide'; + } else { + // Get toggle + toggle = document.getElementById('toggle-part-details'); + // Change state of toggle + toggle.innerHTML = ' {% trans "Show Part Details" %}'; + toggle.value = 'show'; + } + } + {% endblock %} \ No newline at end of file From 369864574e4099427c4340b9e0db1a84d0c57c77 Mon Sep 17 00:00:00 2001 From: Matthias Date: Fri, 30 Jul 2021 23:25:45 +0200 Subject: [PATCH 06/12] only include setting in the settings that have a key --- InvenTree/common/models.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/InvenTree/common/models.py b/InvenTree/common/models.py index 54dc21c1b5..38dcce28d9 100644 --- a/InvenTree/common/models.py +++ b/InvenTree/common/models.py @@ -58,12 +58,13 @@ class BaseInvenTreeSetting(models.Model): # Query the database for setting in results: - settings.append({ - "key": setting.key.upper(), - "value": setting.value - }) + if setting.key: + settings.append({ + "key": setting.key.upper(), + "value": setting.value + }) - keys.add(setting.key.upper()) + keys.add(setting.key.upper()) # Specify any "default" values which are not in the database for key in cls.GLOBAL_SETTINGS.keys(): From 2347f15c2ee05ad6a2dca59bfb6c34846aa15d17 Mon Sep 17 00:00:00 2001 From: Matthias Date: Sun, 1 Aug 2021 01:05:43 +0200 Subject: [PATCH 07/12] new command to cleanup old settings in db --- .../management/commands/clean_settings.py | 40 +++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 InvenTree/InvenTree/management/commands/clean_settings.py diff --git a/InvenTree/InvenTree/management/commands/clean_settings.py b/InvenTree/InvenTree/management/commands/clean_settings.py new file mode 100644 index 0000000000..9e94497e98 --- /dev/null +++ b/InvenTree/InvenTree/management/commands/clean_settings.py @@ -0,0 +1,40 @@ +""" +Custom management command to cleanup old settings that are not defined anymore +""" + +from django.core.management.base import BaseCommand + + +class Command(BaseCommand): + """ + Cleanup old (undefined) settings in the database + """ + + def handle(self, *args, **kwargs): + + print("Collecting settings") + from common.models import InvenTreeSetting, InvenTreeUserSetting + + # general settings + db_settings = InvenTreeSetting.objects.all() + model_settings = InvenTreeSetting.GLOBAL_SETTINGS + + # check if key exist and delete if not + for setting in db_settings: + print(setting.key) + if setting.key not in model_settings: + setting.delete() + print(f"deleted setting '{setting.key}'") + + # user settings + db_settings = InvenTreeUserSetting.objects.all() + model_settings = InvenTreeUserSetting.GLOBAL_SETTINGS + + # check if key exist and delete if not + for setting in db_settings: + print(setting.key) + if setting.key not in model_settings: + setting.delete() + print(f"deleted user setting '{setting.key}'") + + print("checked all settings") From ae8e58ac12bdba8e19136b4563821533f049abac Mon Sep 17 00:00:00 2001 From: Matthias Date: Sun, 1 Aug 2021 01:06:17 +0200 Subject: [PATCH 08/12] invoke task for celan_settings --- tasks.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/tasks.py b/tasks.py index b78a135b08..a9168f4649 100644 --- a/tasks.py +++ b/tasks.py @@ -137,6 +137,14 @@ def rebuild(c): manage(c, "rebuild_models") +@task +def clean_settings(c): + """ + Clean the setting tables of old settings + """ + + manage(c, "clean_settings") + @task def migrate(c): """ @@ -167,7 +175,7 @@ def static(c): manage(c, "collectstatic --no-input") -@task(pre=[install, migrate, static]) +@task(pre=[install, migrate, static, clean_settings]) def update(c): """ Update InvenTree installation. From c0921fc7cedeef1522a969db9fdc9d61188018d0 Mon Sep 17 00:00:00 2001 From: Matthias Date: Sun, 1 Aug 2021 01:16:10 +0200 Subject: [PATCH 09/12] removing unneeded prints --- InvenTree/InvenTree/management/commands/clean_settings.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/InvenTree/InvenTree/management/commands/clean_settings.py b/InvenTree/InvenTree/management/commands/clean_settings.py index 9e94497e98..e0fd09e6c7 100644 --- a/InvenTree/InvenTree/management/commands/clean_settings.py +++ b/InvenTree/InvenTree/management/commands/clean_settings.py @@ -21,7 +21,6 @@ class Command(BaseCommand): # check if key exist and delete if not for setting in db_settings: - print(setting.key) if setting.key not in model_settings: setting.delete() print(f"deleted setting '{setting.key}'") @@ -32,7 +31,6 @@ class Command(BaseCommand): # check if key exist and delete if not for setting in db_settings: - print(setting.key) if setting.key not in model_settings: setting.delete() print(f"deleted user setting '{setting.key}'") From 55762f2a96c9bc58c1b95c0851d8d4fdc99c23db Mon Sep 17 00:00:00 2001 From: Matthias Date: Sun, 1 Aug 2021 01:41:46 +0200 Subject: [PATCH 10/12] do not use safe in template that can cause wrong escaping and generally is considered unsafe --- InvenTree/common/models.py | 5 +++-- InvenTree/templates/js/dynamic/settings.js | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/InvenTree/common/models.py b/InvenTree/common/models.py index 38dcce28d9..5d75a4dd74 100644 --- a/InvenTree/common/models.py +++ b/InvenTree/common/models.py @@ -20,6 +20,7 @@ from djmoney.contrib.exchange.models import convert_money from djmoney.contrib.exchange.exceptions import MissingRate from django.utils.translation import ugettext_lazy as _ +from django.utils.html import format_html from django.core.validators import MinValueValidator, URLValidator from django.core.exceptions import ValidationError @@ -91,10 +92,10 @@ class BaseInvenTreeSetting(models.Model): # Numerical values remain the same elif cls.validator_is_int(validator): pass - + # Wrap strings with quotes else: - value = f"'{value}'" + value = format_html("'{}'", value) setting["value"] = value diff --git a/InvenTree/templates/js/dynamic/settings.js b/InvenTree/templates/js/dynamic/settings.js index 4cc824ed6c..ad4e297c4a 100644 --- a/InvenTree/templates/js/dynamic/settings.js +++ b/InvenTree/templates/js/dynamic/settings.js @@ -6,12 +6,12 @@ var user_settings = { {% for setting in USER_SETTINGS %} - {{ setting.key }}: {{ setting.value|safe }}, + {{ setting.key }}: {{ setting.value }}, {% endfor %} }; var global_settings = { {% for setting in GLOBAL_SETTINGS %} - {{ setting.key }}: {{ setting.value|safe }}, + {{ setting.key }}: {{ setting.value }}, {% endfor %} }; \ No newline at end of file From 83dab558d796b74b153afe564d59064cc63f7147 Mon Sep 17 00:00:00 2001 From: Matthias Date: Sun, 1 Aug 2021 20:44:26 +0200 Subject: [PATCH 11/12] catch connection errors in exchange update #Fixes #1888 --- InvenTree/InvenTree/exchange.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/InvenTree/InvenTree/exchange.py b/InvenTree/InvenTree/exchange.py index c75a827cc7..e329b157af 100644 --- a/InvenTree/InvenTree/exchange.py +++ b/InvenTree/InvenTree/exchange.py @@ -1,4 +1,5 @@ from common.settings import currency_code_default, currency_codes +from urllib.error import HTTPError, URLError from djmoney.contrib.exchange.backends.base import SimpleExchangeBackend @@ -26,4 +27,9 @@ class InvenTreeExchange(SimpleExchangeBackend): symbols = ','.join(currency_codes()) - super().update_rates(base=base_currency, symbols=symbols) + try: + super().update_rates(base=base_currency, symbols=symbols) + # catch connection errors + except (HTTPError, URLError): + print('Encountered connection error while updating') + From 0f11ab527fd0f94f1ce81f14e6027f5be6ae7ff0 Mon Sep 17 00:00:00 2001 From: Matthias Date: Sun, 1 Aug 2021 20:58:57 +0200 Subject: [PATCH 12/12] PEP fix --- InvenTree/InvenTree/exchange.py | 1 - 1 file changed, 1 deletion(-) diff --git a/InvenTree/InvenTree/exchange.py b/InvenTree/InvenTree/exchange.py index e329b157af..9981e52ff7 100644 --- a/InvenTree/InvenTree/exchange.py +++ b/InvenTree/InvenTree/exchange.py @@ -32,4 +32,3 @@ class InvenTreeExchange(SimpleExchangeBackend): # catch connection errors except (HTTPError, URLError): print('Encountered connection error while updating') -