2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-07-13 08:21:26 +00:00

PEP fixes for /part

This commit is contained in:
Oliver Walters
2019-04-14 09:25:46 +10:00
parent 76b0d17b11
commit cf374252c1
3 changed files with 7 additions and 8 deletions

View File

@ -7,7 +7,6 @@ from django.utils.translation import gettext_lazy as _
from django.core.exceptions import ValidationError
from django.db import models
from django.db.models import Sum
from django.core.validators import MinValueValidator
from django.db.models.signals import pre_delete
@ -250,7 +249,6 @@ class Part(models.Model):
self.allocated_build_count,
])
@property
def stock_entries(self):
return [loc for loc in self.locations.all() if loc.in_stock]
@ -263,7 +261,6 @@ class Part(models.Model):
return sum([loc.quantity for loc in self.stock_entries])
@property
def has_bom(self):
return self.bom_count > 0