PEP fixes

This commit is contained in:
Oliver Walters 2019-05-01 08:19:57 +10:00
parent 436d158cfe
commit 7dd960a299
2 changed files with 3 additions and 5 deletions

View File

@ -31,7 +31,7 @@ class Build(models.Model):
"""
def save(self, *args, **kwargs):
""" Called when the Build model is saved to the database.
""" Called when the Build model is saved to the database.
If this is a new Build, try to allocate StockItem objects automatically.
@ -67,13 +67,12 @@ class Build(models.Model):
# Allocate parts to this build
build_item = BuildItem(
build=self,
build=self,
stock_item=stock_item,
quantity=q_req)
build_item.save()
def __str__(self):
return "Build {q} x {part}".format(q=self.quantity, part=str(self.part))
@ -129,7 +128,6 @@ class Build(models.Model):
"""
print("cancelled!")
def completeBuild(self):
""" Mark the Build as COMPLETE

View File

@ -69,7 +69,7 @@ class BuildCancel(AjaxView):
class BuildComplete(AjaxView):
""" View to mark a build as Complete.
""" View to mark a build as Complete.
- Notifies the user of which parts will be removed from stock.
- Removes allocated items from stock