mirror of
				https://github.com/inventree/InvenTree.git
				synced 2025-10-30 20:55:42 +00:00 
			
		
		
		
	subclass TreeManager
This commit is contained in:
		| @@ -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. | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user