mirror of
https://github.com/lemeow125/Borrowing-TrackerBackend.git
synced 2024-11-17 06:19:26 +08:00
Allow blank values in certain transaction fields
This commit is contained in:
parent
004896cb26
commit
7bd33228a6
1 changed files with 6 additions and 2 deletions
|
@ -32,8 +32,12 @@ class TransactionSerializer(serializers.HyperlinkedModelSerializer):
|
||||||
equipments = serializers.SlugRelatedField(
|
equipments = serializers.SlugRelatedField(
|
||||||
many=True, slug_field='id', queryset=EquipmentInstance.objects.all(), required=True)
|
many=True, slug_field='id', queryset=EquipmentInstance.objects.all(), required=True)
|
||||||
subject = serializers.CharField(required=True, allow_null=False)
|
subject = serializers.CharField(required=True, allow_null=False)
|
||||||
additional_members = serializers.CharField(required=False, allow_null=True)
|
additional_members = serializers.CharField(
|
||||||
consumables = serializers.CharField(required=False, allow_null=True)
|
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(
|
timestamp = serializers.DateTimeField(
|
||||||
format="%m-%d-%Y %I:%M %p", read_only=True)
|
format="%m-%d-%Y %I:%M %p", read_only=True)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue