From 11f596708da478d41b4036a728073bc4fbf44544 Mon Sep 17 00:00:00 2001 From: Mark Veidemanis Date: Sat, 11 Mar 2023 13:04:16 +0000 Subject: [PATCH] Round profit values --- core/views/profit.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/views/profit.py b/core/views/profit.py index 7b25012..44622df 100644 --- a/core/views/profit.py +++ b/core/views/profit.py @@ -21,7 +21,8 @@ class Profit(LoginRequiredMixin, OTPRequiredMixin, ObjectRead): user=self.request.user, nordigen=NordigenClient, agora=AgoraClient ) ) - print("RES", res) + for key in res.keys(): + res[key] = round(res[key], 2) results = { "Bank balance total": res["total_sinks_usd"], "Platform balance total": res["total_usd_agora"], @@ -38,4 +39,5 @@ class Profit(LoginRequiredMixin, OTPRequiredMixin, ObjectRead): ], "Withdrawal trigger": res["withdraw_threshold"], } + return results