mirror of
https://github.com/inventree/InvenTree.git
synced 2025-06-13 02:25:38 +00:00
Expose test templates to the API
This commit is contained in:
@ -10,6 +10,7 @@ from .models import PartCategory
|
||||
from .models import BomItem
|
||||
from .models import PartParameter, PartParameterTemplate
|
||||
from .models import PartAttachment
|
||||
from .models import PartTestTemplate
|
||||
|
||||
from decimal import Decimal
|
||||
|
||||
@ -56,6 +57,22 @@ class PartAttachmentSerializer(InvenTreeModelSerializer):
|
||||
]
|
||||
|
||||
|
||||
class PartTestTemplateSerializer(InvenTreeModelSerializer):
|
||||
"""
|
||||
Serializer for the PartTestTemplate class
|
||||
"""
|
||||
|
||||
class Meta:
|
||||
model = PartTestTemplate
|
||||
|
||||
fields = [
|
||||
'pk',
|
||||
'part',
|
||||
'test_name',
|
||||
'required'
|
||||
]
|
||||
|
||||
|
||||
class PartThumbSerializer(serializers.Serializer):
|
||||
"""
|
||||
Serializer for the 'image' field of the Part model.
|
||||
|
Reference in New Issue
Block a user