mirror of
https://github.com/lemeow125/Borrowing-TrackerBackend.git
synced 2024-11-17 06:19:26 +08:00
Added correct choices for status field in equipmentinstance
This commit is contained in:
parent
0e11d7e1ed
commit
0ea1251507
1 changed files with 1 additions and 0 deletions
|
@ -91,6 +91,7 @@ class EquipmentInstanceSerializer(serializers.HyperlinkedModelSerializer):
|
||||||
last_updated = serializers.DateTimeField(
|
last_updated = serializers.DateTimeField(
|
||||||
format="%m-%d-%Y %I:%M%p", read_only=True)
|
format="%m-%d-%Y %I:%M%p", read_only=True)
|
||||||
last_updated_by = serializers.SerializerMethodField()
|
last_updated_by = serializers.SerializerMethodField()
|
||||||
|
status = serializers.ChoiceField(choices=EquipmentInstance.STATUS_CHOICES)
|
||||||
|
|
||||||
# Forbid user from changing equipment field once the instance is already created
|
# Forbid user from changing equipment field once the instance is already created
|
||||||
def update(self, instance, validated_data):
|
def update(self, instance, validated_data):
|
||||||
|
|
Loading…
Reference in a new issue