1
0
mirror of https://gitlab.crans.org/bde/nk20 synced 2024-11-26 18:37:12 +00:00

Fix the amount history in the button update page

This commit is contained in:
Yohann D'ANELLO 2020-08-13 20:04:46 +02:00
parent f5f379e6ad
commit 29f8b9215d

View File

@ -121,6 +121,9 @@ class TransactionTemplateUpdateView(ProtectQuerysetMixin, LoginRequiredMixin, Up
for log in update_logs.all(): for log in update_logs.all():
old_dict = json.loads(log.previous) old_dict = json.loads(log.previous)
new_dict = json.loads(log.data) 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"] old_price = old_dict["amount"]
new_price = new_dict["amount"] new_price = new_dict["amount"]
if old_price != new_price: if old_price != new_price: