From 0d9466c1fef995ee237e82868bc7b215fcf5a0c4 Mon Sep 17 00:00:00 2001 From: Timotheus Pokorra Date: Tue, 11 May 2021 20:58:24 +0200 Subject: [PATCH] fix for fiat amount --- apps/transactions/migrations/0004_auto_20210511_0703.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/apps/transactions/migrations/0004_auto_20210511_0703.py b/apps/transactions/migrations/0004_auto_20210511_0703.py index dcb8a64..e0715fa 100644 --- a/apps/transactions/migrations/0004_auto_20210511_0703.py +++ b/apps/transactions/migrations/0004_auto_20210511_0703.py @@ -20,6 +20,8 @@ def separate_fees(apps, schema_editor): tr.transaction_type = 'T' tr.fiat_amount = tr.amount + if tr.fiat_amount < 0: + tr.fiat_amount = -1 * tr.fiat_amount tr.fiat_fee = 0 tr.save()