diff --git a/InvenTree/company/apps.py b/InvenTree/company/apps.py index 25f3bd96dc..949ee152c0 100644 --- a/InvenTree/company/apps.py +++ b/InvenTree/company/apps.py @@ -6,6 +6,7 @@ from django.apps import AppConfig from django.db.utils import OperationalError, ProgrammingError from django.conf import settings + class CompanyConfig(AppConfig): name = 'company' @@ -33,4 +34,3 @@ class CompanyConfig(AppConfig): company.image.render_variations(replace=False) except (OperationalError, ProgrammingError): print("Could not generate Company thumbnails") - \ No newline at end of file diff --git a/InvenTree/company/models.py b/InvenTree/company/models.py index 0493cbbfa1..462b4ff847 100644 --- a/InvenTree/company/models.py +++ b/InvenTree/company/models.py @@ -17,7 +17,6 @@ from django.db.models import Sum from django.apps import apps from django.urls import reverse -from django.conf import settings from markdownx.models import MarkdownxField diff --git a/InvenTree/part/models.py b/InvenTree/part/models.py index f255d2a77b..d751dca215 100644 --- a/InvenTree/part/models.py +++ b/InvenTree/part/models.py @@ -10,7 +10,6 @@ import os from django.utils.translation import gettext_lazy as _ from django.core.exceptions import ValidationError from django.urls import reverse -from django.conf import settings from django.db import models, transaction from django.db.models import Sum @@ -313,7 +312,7 @@ class Part(models.Model): return helpers.getMediaUrl(self.image.thumbnail.url) else: return helpers.getBlankThumbnail() - + def validate_unique(self, exclude=None): """ Validate that a part is 'unique'. Uniqueness is checked across the following (case insensitive) fields: