mirror of
https://github.com/inventree/InvenTree.git
synced 2026-11-25 09:13:08 +00:00
Reverse lookup for part category URL
- Added some test cases for PartCategory model
This commit is contained in:
1 parent
a2d4403968
commit
f9db3b680d
3 files changed
+71
-3
No files matched your search
@@ -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