2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-05-04 22:38:49 +00:00

PEP code style fixes

This commit is contained in:
Oliver 2021-11-25 14:55:24 +11:00
parent e6dfe27c57
commit 4a90786296
3 changed files with 3 additions and 3 deletions

View File

@ -1071,7 +1071,7 @@ class PartRelatedList(generics.ListCreateAPIView):
if part is not None: if part is not None:
try: try:
part = Part.objects.get(pk=part) part = Part.objects.get(pk=part)
queryset = queryset.filter(Q(part_1=part) | Q(part_2=part)) queryset = queryset.filter(Q(part_1=part) | Q(part_2=part))
except (ValueError, Part.DoesNotExist): except (ValueError, Part.DoesNotExist):

View File

@ -17,7 +17,7 @@ from InvenTree.fields import RoundingDecimalFormField
import common.models import common.models
from common.forms import MatchItemForm from common.forms import MatchItemForm
from .models import Part, PartCategory, PartRelated from .models import Part, PartCategory
from .models import PartParameterTemplate from .models import PartParameterTemplate
from .models import PartCategoryParameterTemplate from .models import PartCategoryParameterTemplate
from .models import PartSellPriceBreak, PartInternalPriceBreak from .models import PartSellPriceBreak, PartInternalPriceBreak

View File

@ -5,7 +5,7 @@ from django.urls import reverse
from django.contrib.auth import get_user_model from django.contrib.auth import get_user_model
from django.contrib.auth.models import Group from django.contrib.auth.models import Group
from .models import Part, PartRelated from .models import Part
class PartViewTestCase(TestCase): class PartViewTestCase(TestCase):