mirror of
https://github.com/inventree/InvenTree.git
synced 2025-04-30 12:36:45 +00:00
subclass TreeManager
This commit is contained in:
parent
cb0b7209ec
commit
b04a403081
@ -27,6 +27,7 @@ from markdownx.models import MarkdownxField
|
|||||||
from django_cleanup import cleanup
|
from django_cleanup import cleanup
|
||||||
|
|
||||||
from mptt.models import TreeForeignKey, MPTTModel
|
from mptt.models import TreeForeignKey, MPTTModel
|
||||||
|
from mptt.managers import TreeManager
|
||||||
|
|
||||||
from stdimage.models import StdImageField
|
from stdimage.models import StdImageField
|
||||||
|
|
||||||
@ -284,7 +285,7 @@ def match_part_names(match, threshold=80, reverse=True, compare_length=False):
|
|||||||
return matches
|
return matches
|
||||||
|
|
||||||
|
|
||||||
class PartManager(models.Manager):
|
class PartManager(TreeManager):
|
||||||
"""
|
"""
|
||||||
Defines a custom object manager for the Part model.
|
Defines a custom object manager for the Part model.
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user