From 9c8889df0eb3aaa58137314e7051933f33c2691d Mon Sep 17 00:00:00 2001 From: keannu125 Date: Tue, 7 Mar 2023 17:47:50 +0800 Subject: [PATCH] Changed history in products url to reflect quantity and date timestamp --- ivy/products/serializers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ivy/products/serializers.py b/ivy/products/serializers.py index b88b5ce..33dd5b4 100644 --- a/ivy/products/serializers.py +++ b/ivy/products/serializers.py @@ -7,7 +7,7 @@ class HistoricalRecordField(serializers.ListField): child = serializers.DictField() def to_representation(self, data): - return super().to_representation(data.values('id', 'history_date').order_by('history_date')) + return super().to_representation(data.values('quantity', 'history_date').order_by('history_date')) class ProductSerializer(serializers.HyperlinkedModelSerializer):