mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
PEP style fixes
This commit is contained in:
parent
09853fd3df
commit
2b344f1f25
@ -695,11 +695,11 @@ class Build(MPTTModel, ReferenceIndexingMixin):
|
||||
)
|
||||
|
||||
if auto_allocate and serial is not None:
|
||||
|
||||
|
||||
# Get a list of BomItem objects which point to "trackable" parts
|
||||
|
||||
for bom_item in self.part.get_trackable_parts():
|
||||
|
||||
|
||||
parts = bom_item.get_valid_parts_for_allocation()
|
||||
|
||||
for part in parts:
|
||||
@ -725,7 +725,6 @@ class Build(MPTTModel, ReferenceIndexingMixin):
|
||||
install_into=output,
|
||||
)
|
||||
|
||||
|
||||
else:
|
||||
"""
|
||||
Create a single build output of the given quantity
|
||||
|
@ -285,9 +285,9 @@ class BuildOutputCreateSerializer(serializers.Serializer):
|
||||
"""
|
||||
Generate the new build output(s)
|
||||
"""
|
||||
|
||||
|
||||
data = self.validated_data
|
||||
|
||||
|
||||
quantity = data['quantity']
|
||||
batch_code = data.get('batch_code', '')
|
||||
auto_allocate = data.get('auto_allocate', False)
|
||||
|
@ -6,16 +6,14 @@ Django views for interacting with Build objects
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.core.exceptions import ValidationError
|
||||
from django.views.generic import DetailView, ListView
|
||||
from django.forms import HiddenInput
|
||||
|
||||
from .models import Build
|
||||
from . import forms
|
||||
|
||||
from InvenTree.views import AjaxUpdateView, AjaxDeleteView
|
||||
from InvenTree.views import InvenTreeRoleMixin
|
||||
from InvenTree.helpers import str2bool, extract_serial_numbers
|
||||
from InvenTree.helpers import str2bool
|
||||
from InvenTree.status_codes import BuildStatus
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user