From b3bacde8df38f70a1b92d1761cca2b9cc9523e34 Mon Sep 17 00:00:00 2001 From: Mark Veidemanis Date: Fri, 2 Dec 2022 07:20:37 +0000 Subject: [PATCH] Remove unnecessary fields from trade response --- core/templates/window-content/trade.html | 2 +- core/views/trades.py | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/core/templates/window-content/trade.html b/core/templates/window-content/trade.html index 729484e..cf2c4ce 100644 --- a/core/templates/window-content/trade.html +++ b/core/templates/window-content/trade.html @@ -29,7 +29,7 @@ {% for key, item in db_info.items %} - {% if key == 'instruments' %} + {% if key == 'response' %} {{ key }} diff --git a/core/views/trades.py b/core/views/trades.py index 084e961..864df8e 100644 --- a/core/views/trades.py +++ b/core/views/trades.py @@ -50,12 +50,15 @@ class TradeAction(LoginRequiredMixin, OTPRequiredMixin, View): if type == "page": type = "modal" + db_info = db_info.__dict__ + del db_info["_state"] + del db_info["_original"] context = { "title": f"Trade info ({type})", "unique": unique, "window_content": self.window_content, "type": type, - "db_info": db_info.__dict__, + "db_info": db_info, "live_info": live_info, }