From 7bd33228a6cd70b01a4d3970b6f1d2b342454cc6 Mon Sep 17 00:00:00 2001 From: Keannu Bernasol Date: Fri, 5 Jan 2024 20:44:21 +0800 Subject: [PATCH] Allow blank values in certain transaction fields --- equipment_tracker/transactions/serializers.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/equipment_tracker/transactions/serializers.py b/equipment_tracker/transactions/serializers.py index 91be453..eaad849 100644 --- a/equipment_tracker/transactions/serializers.py +++ b/equipment_tracker/transactions/serializers.py @@ -32,8 +32,12 @@ class TransactionSerializer(serializers.HyperlinkedModelSerializer): equipments = serializers.SlugRelatedField( many=True, slug_field='id', queryset=EquipmentInstance.objects.all(), required=True) subject = serializers.CharField(required=True, allow_null=False) - additional_members = serializers.CharField(required=False, allow_null=True) - consumables = serializers.CharField(required=False, allow_null=True) + additional_members = serializers.CharField( + required=False, allow_null=True, allow_blank=True) + remarks = serializers.CharField( + required=False, allow_null=True, allow_blank=True) + consumables = serializers.CharField( + required=False, allow_null=True, allow_blank=True) timestamp = serializers.DateTimeField( format="%m-%d-%Y %I:%M %p", read_only=True)