Skip to content

Commit

Permalink
Fix PaymentAmountSerializer min_value that was not Decimal
Browse files Browse the repository at this point in the history
  • Loading branch information
DeD1rk committed Jun 21, 2024
1 parent 74c4f80 commit 17ebc7b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions website/sales/api/v2/admin/serializers/shift.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from decimal import Decimal

from rest_framework import serializers

from payments.api.v2.serializers.payment_amount import PaymentAmountSerializer
Expand Down Expand Up @@ -42,8 +44,8 @@ class Meta:
"product_sales",
)

total_revenue = PaymentAmountSerializer(min_value=0, read_only=True)
total_revenue_paid = PaymentAmountSerializer(min_value=0, read_only=True)
total_revenue = PaymentAmountSerializer(min_value=Decimal(0), read_only=True)
total_revenue_paid = PaymentAmountSerializer(min_value=Decimal(0), read_only=True)

products = ProductListItemSerializer(
source="product_list.product_items", many=True, read_only=True
Expand Down

0 comments on commit 17ebc7b

Please sign in to comment.