mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Mark some fields as not-required via the API
This commit is contained in:
parent
f8e36c5468
commit
774e26eb19
@ -104,12 +104,14 @@ class StockItemSerializer(InvenTreeModelSerializer):
|
|||||||
location_detail = LocationBriefSerializer(source='location', many=False, read_only=True)
|
location_detail = LocationBriefSerializer(source='location', many=False, read_only=True)
|
||||||
supplier_part_detail = SupplierPartSerializer(source='supplier_part', many=False, read_only=True)
|
supplier_part_detail = SupplierPartSerializer(source='supplier_part', many=False, read_only=True)
|
||||||
|
|
||||||
tracking_items = serializers.IntegerField(source='tracking_info_count')
|
tracking_items = serializers.IntegerField(source='tracking_info_count', read_only=True, required=False)
|
||||||
|
|
||||||
quantity = serializers.FloatField()
|
quantity = serializers.FloatField()
|
||||||
allocated = serializers.FloatField(source='allocation_count')
|
allocated = serializers.FloatField(source='allocation_count', required=False)
|
||||||
|
|
||||||
required_tests = serializers.IntegerField(source='required_test_count', read_only=True)
|
serial = serializers.IntegerField(required=False)
|
||||||
|
|
||||||
|
required_tests = serializers.IntegerField(source='required_test_count', read_only=True, required=False)
|
||||||
|
|
||||||
def __init__(self, *args, **kwargs):
|
def __init__(self, *args, **kwargs):
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user