PEP fixes

This commit is contained in:
Oliver Walters 2019-06-05 00:21:19 +10:00
parent c82d5482aa
commit e199ed2281
6 changed files with 15 additions and 20 deletions

View File

@ -71,7 +71,6 @@ class Build(models.Model):
help_text='Number of parts to build'
)
status = models.PositiveIntegerField(default=BuildStatus.PENDING,
choices=BuildStatus.items(),
validators=[MinValueValidator(0)],

View File

@ -150,7 +150,6 @@ class Company(models.Model):
])
class Contact(models.Model):
""" A Contact represents a person who works at a particular company.
A Company may have zero or more associated Contact objects.

View File

@ -2,7 +2,6 @@
from __future__ import unicode_literals
from django.contrib import admin
from import_export.admin import ImportExportModelAdmin
from .models import PurchaseOrder, PurchaseOrderLineItem

View File

@ -1,12 +1,10 @@
from django.db import models, transaction
from django.db import models
from django.core.validators import MinValueValidator
from django.contrib.auth.models import User
from django.utils.translation import ugettext as _
from part.models import Part
from company.models import Company
from stock.models import StockItem
from InvenTree.status_codes import OrderStatus
@ -75,7 +73,8 @@ class PurchaseOrder(Order):
ORDER_PREFIX = "PO"
supplier = models.ForeignKey(Company, on_delete=models.CASCADE,
supplier = models.ForeignKey(
Company, on_delete=models.CASCADE,
limit_choices_to={
'is_supplier': True,
},
@ -83,6 +82,7 @@ class PurchaseOrder(Order):
help_text=_('Company')
)
class OrderLineItem(models.Model):
""" Abstract model for an order line item

View File

@ -1,3 +1 @@
from django.test import TestCase
# Create your tests here.
# TODO - Implement tests for the order app