PEP style fixes

This commit is contained in:
Oliver Walters 2020-04-22 22:24:06 +10:00
parent fd42149f67
commit 26d1a25f31
4 changed files with 3 additions and 5 deletions

View File

@ -19,8 +19,8 @@ from company.models import SupplierPart
from .models import PurchaseOrder, PurchaseOrderLineItem
from .serializers import POSerializer, POLineItemSerializer
from .models import SalesOrder, SalesOrderLineItem, SalesOrderAllocation
from .serializers import SalesOrderSerializer, SOLineItemSerializer, SalesOrderAllocationSerializer
from .models import SalesOrder, SalesOrderLineItem
from .serializers import SalesOrderSerializer, SOLineItemSerializer
class POList(generics.ListCreateAPIView):

View File

@ -482,4 +482,3 @@ class SalesOrderAllocation(models.Model):
return self.item.location.pathstring
else:
return ""

View File

@ -12,7 +12,6 @@ from django.db.models import Count
from InvenTree.serializers import InvenTreeModelSerializer
from company.serializers import CompanyBriefSerializer
from part.serializers import PartBriefSerializer
from stock.serializers import StockItemSerializer
from .models import PurchaseOrder, PurchaseOrderLineItem
from .models import SalesOrder, SalesOrderLineItem

View File

@ -1227,7 +1227,7 @@ class SalesOrderAllocationCreate(AjaxCreateView):
# Hide the 'line' field
form.fields['line'].widget = HiddenInput()
except KeyError: # (ValueError, SalesOrderLineItem.DoesNotExist):
except (ValueError, SalesOrderLineItem.DoesNotExist):
pass
return form