mirror of
https://github.com/inventree/InvenTree.git
synced 2025-06-12 10:05:39 +00:00
Added a categorylist page
Displays list of all top-level part categories
This commit is contained in:
@ -16,10 +16,10 @@ class PartCategory(models.Model):
|
||||
# Return the parent path of this category
|
||||
@property
|
||||
def path(self):
|
||||
parent_path = []
|
||||
|
||||
if self.parent:
|
||||
parent_path = self.parent.path + [self.parent]
|
||||
return self.parent.path + [self.parent]
|
||||
else:
|
||||
return []
|
||||
|
||||
return parent_path
|
||||
|
||||
|
Reference in New Issue
Block a user