mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
PEP fixes
This commit is contained in:
parent
019d5aa4ba
commit
9c4a5d10fa
@ -118,11 +118,10 @@ class Build(models.Model):
|
|||||||
completion_date = models.DateField(null=True, blank=True)
|
completion_date = models.DateField(null=True, blank=True)
|
||||||
|
|
||||||
completed_by = models.ForeignKey(User,
|
completed_by = models.ForeignKey(User,
|
||||||
on_delete=models.SET_NULL,
|
on_delete=models.SET_NULL,
|
||||||
blank=True, null=True,
|
blank=True, null=True,
|
||||||
related_name='builds_completed'
|
related_name='builds_completed'
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
URL = models.URLField(blank=True, help_text='Link to external URL')
|
URL = models.URLField(blank=True, help_text='Link to external URL')
|
||||||
|
|
||||||
@ -141,7 +140,6 @@ class Build(models.Model):
|
|||||||
for item in self.allocated_stock.all():
|
for item in self.allocated_stock.all():
|
||||||
item.delete()
|
item.delete()
|
||||||
|
|
||||||
|
|
||||||
# Date of 'completion' is the date the build was cancelled
|
# Date of 'completion' is the date the build was cancelled
|
||||||
self.completion_date = datetime.now().date()
|
self.completion_date = datetime.now().date()
|
||||||
self.completed_by = user
|
self.completed_by = user
|
||||||
|
Loading…
Reference in New Issue
Block a user