remove state from api interface

This commit is contained in:
Matthias 2021-12-08 22:44:01 +01:00
parent cfa576d03d
commit ba921b45ff
No known key found for this signature in database
GPG Key ID: F50EF5741D33E076

View File

@ -87,15 +87,6 @@ class CategoryTree(InvenTreeModelSerializer):
def get_a_attr(self, obj):
return {'href': obj.get_absolute_url()}
# state = serializers.SerializerMethodField()
# def get_state(self, obj):
# state = {}
# if 'ancestors' in self.context:
# state['opened'] = obj in self.context['ancestors'] or obj == self.context['root']
# state['selected'] = obj == self.context['active']
# return state
class Meta:
model = PartCategory
fields = [
@ -103,7 +94,6 @@ class CategoryTree(InvenTreeModelSerializer):
'text',
'parent',
'a_attr',
#'state',
]