diff --git a/oscarapi/serializers/admin/order.py b/oscarapi/serializers/admin/order.py index 89e5d3b5..bc4438fe 100644 --- a/oscarapi/serializers/admin/order.py +++ b/oscarapi/serializers/admin/order.py @@ -22,6 +22,4 @@ class AdminOrderLineAttributeSerializer(OrderLineAttributeSerializer): class AdminOrderLineSerializer(OrderLineSerializer): url = serializers.HyperlinkedIdentityField(view_name="admin-order-lines-detail") - attributes = AdminOrderLineAttributeSerializer( - many=True, fields=("url", "option", "value"), required=False - ) + attributes = AdminOrderLineAttributeSerializer(many=True, required=False) diff --git a/oscarapi/serializers/checkout.py b/oscarapi/serializers/checkout.py index 3b4f6280..59cf9273 100644 --- a/oscarapi/serializers/checkout.py +++ b/oscarapi/serializers/checkout.py @@ -118,16 +118,14 @@ class OrderLineAttributeSerializer(OscarHyperlinkedModelSerializer): class Meta: model = OrderLineAttribute - fields = "__all__" + fields = ["url", "option", "value"] class OrderLineSerializer(OscarHyperlinkedModelSerializer): "This serializer renames some fields so they match up with the basket" url = serializers.HyperlinkedIdentityField(view_name="order-lines-detail") - attributes = OrderLineAttributeSerializer( - many=True, fields=("url", "option", "value"), required=False - ) + attributes = OrderLineAttributeSerializer(many=True, required=False) price_currency = serializers.CharField(source="order.currency", max_length=12) price_excl_tax = serializers.DecimalField( decimal_places=2, max_digits=12, source="line_price_excl_tax"