diff --git a/backend/account/views.py b/backend/account/views.py index f30504b..27df279 100644 --- a/backend/account/views.py +++ b/backend/account/views.py @@ -80,7 +80,7 @@ class SendOTPView(APIView): except User.DoesNotExist: return Response({'detail': 'user not found'}, status=status.HTTP_404_NOT_FOUND) except Exception as e: - return Response({'detail': f'error: {e} مشتی فعلا برو تو غمت نباشه تا بعدا یه کاریش بکنم', 'otp_code': otp}, status=status.HTTP_200_OK) + return Response({'detail': f'error'}, status=status.HTTP_500_INTERNAL_SERVER_ERROR) # return Response({'detail': f'An error occurred: {e}'}, status=status.HTTP_500_INTERNAL_SERVER_ERROR) @extend_schema_view( post=extend_schema(tags=['authentication']) diff --git a/backend/order/serializers.py b/backend/order/serializers.py index 1c62795..bf3342b 100644 --- a/backend/order/serializers.py +++ b/backend/order/serializers.py @@ -79,16 +79,12 @@ class OrderItemSerailzier(serializers.ModelSerializer): def get_special_discount_amount(self, obj): # For cart items - print('in here asdfasfd') amount = getattr(obj, 'special_discount_amount', None) - print(amount) if amount is None: - print('in here') # 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 - print('in here ') return f'{int(amount):,.0f} تومان'