mirror of
https://github.com/lemeow125/EquipmentTracker-Backend.git
synced 2024-11-16 21:59:25 +08:00
Add default empty string value to remarks and description fields
This commit is contained in:
parent
58793e210b
commit
343bd272e9
1 changed files with 4 additions and 2 deletions
|
@ -64,7 +64,8 @@ class EquipmentLogSerializer(serializers.HyperlinkedModelSerializer):
|
|||
format="%m-%d-%Y %I:%M%p", read_only=True)
|
||||
last_updated_by = serializers.SerializerMethodField()
|
||||
name = serializers.CharField()
|
||||
description = serializers.CharField(required=False, allow_blank=True)
|
||||
description = serializers.CharField(
|
||||
required=False, allow_blank=True, default="")
|
||||
history = EquipmentHistoricalRecordField()
|
||||
|
||||
class Meta:
|
||||
|
@ -98,7 +99,8 @@ class EquipmentInstanceSerializer(serializers.HyperlinkedModelSerializer):
|
|||
category = serializers.CharField(
|
||||
source='equipment.category', read_only=True)
|
||||
status = serializers.CharField()
|
||||
remarks = serializers.CharField(required=False, allow_blank=True)
|
||||
remarks = serializers.CharField(
|
||||
required=False, allow_blank=True, default="")
|
||||
date_added = serializers.DateTimeField(
|
||||
format="%m-%d-%Y %I:%M%p", read_only=True)
|
||||
last_updated = serializers.DateTimeField(
|
||||
|
|
Loading…
Reference in a new issue