2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-07-16 01:36:29 +00:00

Added helper functions, improved UI

This commit is contained in:
Oliver
2018-04-16 23:26:02 +10:00
parent a67d5b58db
commit 937470750b
12 changed files with 50 additions and 29 deletions

View File

@@ -90,6 +90,10 @@ class InvenTreeTree(models.Model):
return unique
@property
def has_children(self):
return self.children.count() > 0
@property
def children(self):
contents = ContentType.objects.get_for_model(type(self))