Merge branch 'main' of https://github.com/Byeto-Company/hossein_por_shop
This commit is contained in:
@@ -83,8 +83,8 @@ class OrderItemSerailzier(serializers.ModelSerializer):
|
||||
if amount is None:
|
||||
# If it's an order item, check item_special_discount_amount property
|
||||
amount = getattr(obj, 'item_special_discount_amount', 0)
|
||||
if amount is None:
|
||||
amount = 0
|
||||
if amount is None or amount == 0:
|
||||
return None
|
||||
return f'{int(amount):,.0f} تومان'
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user