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:
parent
e6dfe27c57
commit
4a90786296
@ -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):
|
||||||
|
@ -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
|
||||||
|
@ -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):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user