From d06018cbbe22b56aaaad94a8d69da7699a7a6854 Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Tue, 7 Apr 2020 11:40:10 +1000 Subject: [PATCH] PEP fixes --- InvenTree/company/apps.py | 2 +- InvenTree/company/models.py | 1 - InvenTree/part/models.py | 3 +-- 3 files changed, 2 insertions(+), 4 deletions(-) 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: