mirror of
https://github.com/inventree/InvenTree.git
synced 2025-06-19 13:35:40 +00:00
Tree view now supports root URL link
This commit is contained in:
@ -14,6 +14,7 @@ from rest_framework import generics, permissions
|
||||
|
||||
from django.db.models import Q
|
||||
from django.conf.urls import url, include
|
||||
from django.urls import reverse
|
||||
|
||||
from .models import Part, PartCategory, BomItem, PartStar
|
||||
from .models import SupplierPart, SupplierPriceBreak
|
||||
@ -30,6 +31,10 @@ class PartCategoryTree(TreeSerializer):
|
||||
|
||||
title = "Parts"
|
||||
model = PartCategory
|
||||
|
||||
@property
|
||||
def root_url(self):
|
||||
return reverse('part-index')
|
||||
|
||||
|
||||
class CategoryList(generics.ListCreateAPIView):
|
||||
|
Reference in New Issue
Block a user