From 0d7eb6b72c21a71d0c3e1b291c210a6e2f55a7c0 Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Tue, 24 Aug 2021 22:25:25 +1000 Subject: [PATCH] Style fixes --- InvenTree/order/api.py | 2 +- InvenTree/order/serializers.py | 1 - InvenTree/order/test_api.py | 7 ++++--- InvenTree/templates/js/translated/forms.js | 1 - 4 files changed, 5 insertions(+), 6 deletions(-) diff --git a/InvenTree/order/api.py b/InvenTree/order/api.py index f2b3879e30..e7deb36058 100644 --- a/InvenTree/order/api.py +++ b/InvenTree/order/api.py @@ -31,7 +31,7 @@ from .models import SalesOrder, SalesOrderLineItem, SalesOrderAllocation from .models import SalesOrderAttachment from .serializers import SalesOrderSerializer, SOLineItemSerializer, SOAttachmentSerializer from .serializers import SalesOrderAllocationSerializer -from .serializers import POReceiveSerializer, POLineItemReceiveSerializer +from .serializers import POReceiveSerializer class POList(generics.ListCreateAPIView): diff --git a/InvenTree/order/serializers.py b/InvenTree/order/serializers.py index 8d4c05c0d7..b60228116e 100644 --- a/InvenTree/order/serializers.py +++ b/InvenTree/order/serializers.py @@ -22,7 +22,6 @@ from InvenTree.serializers import InvenTreeAttachmentSerializerField from InvenTree.status_codes import StockStatus -import company.models from company.serializers import CompanyBriefSerializer, SupplierPartSerializer from part.serializers import PartBriefSerializer diff --git a/InvenTree/order/test_api.py b/InvenTree/order/test_api.py index 26f1249cf4..5fab3d8bd9 100644 --- a/InvenTree/order/test_api.py +++ b/InvenTree/order/test_api.py @@ -258,7 +258,7 @@ class PurchaseOrderReceiveTest(OrderTest): def test_invalid_items(self): """ - Test than errors are returned as expected for invalid data + Test than errors are returned as expected for invalid data """ data = self.post( @@ -347,7 +347,7 @@ class PurchaseOrderReceiveTest(OrderTest): self.assertEqual(line_2.received, 50) # Receive two separate line items against this order - data = self.post( + self.post( self.url, { 'items': [ @@ -363,7 +363,8 @@ class PurchaseOrderReceiveTest(OrderTest): ], 'location': 1, # Default location }, - ).data + expected_code=201, + ) # There should be two newly created stock items self.assertEqual(self.n + 2, StockItem.objects.count()) diff --git a/InvenTree/templates/js/translated/forms.js b/InvenTree/templates/js/translated/forms.js index b4bbdc2cc4..f61bc0e2e5 100644 --- a/InvenTree/templates/js/translated/forms.js +++ b/InvenTree/templates/js/translated/forms.js @@ -1570,7 +1570,6 @@ function constructField(name, parameters, options) { // Div for error messages html += `
`; - html += ``; // controls html += ``; // form-group