Obviously new float fields should be read-only...

This commit is contained in:
eeintech 2021-05-13 16:17:45 -04:00
parent f2e9f58f1b
commit 32d0f3039d

View File

@ -367,11 +367,11 @@ class BomItemSerializer(InvenTreeModelSerializer):
validated = serializers.BooleanField(read_only=True, source='is_line_valid')
purchase_price_min = serializers.FloatField()
purchase_price_min = serializers.FloatField(read_only=True)
purchase_price_max = serializers.FloatField()
purchase_price_max = serializers.FloatField(read_only=True)
purchase_price_avg = serializers.FloatField()
purchase_price_avg = serializers.FloatField(read_only=True)
def __init__(self, *args, **kwargs):
# part_detail and sub_part_detail serializers are only included if requested.