Added correct choices for status field in equipmentinstance

This commit is contained in:
Keannu Bernasol 2023-11-13 17:28:40 +08:00
parent 0e11d7e1ed
commit 0ea1251507

View file

@ -91,6 +91,7 @@ class EquipmentInstanceSerializer(serializers.HyperlinkedModelSerializer):
last_updated = serializers.DateTimeField(
format="%m-%d-%Y %I:%M%p", read_only=True)
last_updated_by = serializers.SerializerMethodField()
status = serializers.ChoiceField(choices=EquipmentInstance.STATUS_CHOICES)
# Forbid user from changing equipment field once the instance is already created
def update(self, instance, validated_data):