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

Save tree state 'per tree'

- Separate save state for Part and Stock tree
This commit is contained in:
Oliver Walters
2019-05-09 21:41:44 +10:00
parent 45223fb607
commit bff0f30b13
5 changed files with 51 additions and 9 deletions

View File

@ -57,7 +57,8 @@ class PartCategory(InvenTreeTree):
(including children of child categories)
"""
return len(Part.objects.filter(category__in=self.getUniqueChildren()))
return len(Part.objects.filter(category__in=self.getUniqueChildren(),
active=True))
@property
def has_parts(self):