Format timestamp properly for transaction

This commit is contained in:
Keannu Bernasol 2023-12-21 15:23:28 +08:00
parent fd6da2de81
commit 5c8a99675d

View file

@ -30,6 +30,8 @@ class TransactionSerializer(serializers.HyperlinkedModelSerializer):
many=False, slug_field='id', queryset=CustomUser.objects.all(), required=True, allow_null=False)
equipments = serializers.SlugRelatedField(
many=True, slug_field='id', queryset=EquipmentInstance.objects.all(), required=True)
timestamp = serializers.DateTimeField(
format="%m-%d-%Y %I:%M %p", read_only=True)
transaction_status = serializers.ChoiceField(
choices=Transaction.TRANSACTION_STATUS_CHOICES)