PEP fixes

This commit is contained in:
Oliver Walters 2020-04-07 11:40:10 +10:00
parent 95032141ce
commit d06018cbbe
3 changed files with 2 additions and 4 deletions

View File

@ -6,6 +6,7 @@ from django.apps import AppConfig
from django.db.utils import OperationalError, ProgrammingError from django.db.utils import OperationalError, ProgrammingError
from django.conf import settings from django.conf import settings
class CompanyConfig(AppConfig): class CompanyConfig(AppConfig):
name = 'company' name = 'company'
@ -33,4 +34,3 @@ class CompanyConfig(AppConfig):
company.image.render_variations(replace=False) company.image.render_variations(replace=False)
except (OperationalError, ProgrammingError): except (OperationalError, ProgrammingError):
print("Could not generate Company thumbnails") print("Could not generate Company thumbnails")

View File

@ -17,7 +17,6 @@ from django.db.models import Sum
from django.apps import apps from django.apps import apps
from django.urls import reverse from django.urls import reverse
from django.conf import settings
from markdownx.models import MarkdownxField from markdownx.models import MarkdownxField

View File

@ -10,7 +10,6 @@ import os
from django.utils.translation import gettext_lazy as _ from django.utils.translation import gettext_lazy as _
from django.core.exceptions import ValidationError from django.core.exceptions import ValidationError
from django.urls import reverse from django.urls import reverse
from django.conf import settings
from django.db import models, transaction from django.db import models, transaction
from django.db.models import Sum from django.db.models import Sum
@ -313,7 +312,7 @@ class Part(models.Model):
return helpers.getMediaUrl(self.image.thumbnail.url) return helpers.getMediaUrl(self.image.thumbnail.url)
else: else:
return helpers.getBlankThumbnail() return helpers.getBlankThumbnail()
def validate_unique(self, exclude=None): def validate_unique(self, exclude=None):
""" Validate that a part is 'unique'. """ Validate that a part is 'unique'.
Uniqueness is checked across the following (case insensitive) fields: Uniqueness is checked across the following (case insensitive) fields: