From 29f8b9215d438bba4bcb3d7dd242d909d76b65e5 Mon Sep 17 00:00:00 2001 From: Yohann D'ANELLO Date: Thu, 13 Aug 2020 20:04:46 +0200 Subject: [PATCH] Fix the amount history in the button update page --- apps/note/views.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/apps/note/views.py b/apps/note/views.py index 01fa9048..50358128 100644 --- a/apps/note/views.py +++ b/apps/note/views.py @@ -121,6 +121,9 @@ class TransactionTemplateUpdateView(ProtectQuerysetMixin, LoginRequiredMixin, Up for log in update_logs.all(): old_dict = json.loads(log.previous) new_dict = json.loads(log.data) + if not "amount" in old_price: + # The amount price of the button was not modified in this changelog + continue old_price = old_dict["amount"] new_price = new_dict["amount"] if old_price != new_price: