mirror of
https://github.com/inventree/InvenTree.git
synced 2025-10-25 10:27:39 +00:00
add missed field
This commit is contained in:
@@ -328,18 +328,10 @@ class ManufacturerPartParameterSerializer(
|
|||||||
'units',
|
'units',
|
||||||
]
|
]
|
||||||
|
|
||||||
def __init__(self, *args, **kwargs):
|
manufacturer_part_detail = can_filter(
|
||||||
"""Initialize this serializer with extra detail fields as required."""
|
ManufacturerPartSerializer(
|
||||||
man_detail = kwargs.pop('manufacturer_part_detail', False)
|
source='manufacturer_part', many=False, read_only=True, allow_null=True
|
||||||
|
)
|
||||||
super().__init__(*args, **kwargs)
|
|
||||||
|
|
||||||
# TODO INVE-T1 support complex filters
|
|
||||||
if not man_detail and not isGeneratingSchema():
|
|
||||||
self.fields.pop('manufacturer_part_detail', None)
|
|
||||||
|
|
||||||
manufacturer_part_detail = ManufacturerPartSerializer(
|
|
||||||
source='manufacturer_part', many=False, read_only=True, allow_null=True
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user