mirror of
https://github.com/inventree/InvenTree.git
synced 2025-07-16 09:46:31 +00:00
Reverse lookup for part category URL
- Added some test cases for PartCategory model
This commit is contained in:
@@ -74,9 +74,9 @@ class InvenTreeTree(models.Model):
|
||||
@property
|
||||
def children(self):
|
||||
contents = ContentType.objects.get_for_model(type(self))
|
||||
children = contents.get_all_objects_for_this_type(parent=self.id)
|
||||
childs = contents.get_all_objects_for_this_type(parent=self.id)
|
||||
|
||||
return children
|
||||
return childs
|
||||
|
||||
def getAcceptableParents(self):
|
||||
""" Returns a list of acceptable parent items within this model
|
||||
|
Reference in New Issue
Block a user