From 9d368e176af3838af806e18100f4dc94ef86cec8 Mon Sep 17 00:00:00 2001 From: Raniere Silva Date: Thu, 12 Apr 2018 15:42:32 +0100 Subject: [PATCH] Fix grant_default and grant_used with fixfundingsource.py --- lowfat/management/commands/fixfundingsource.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lowfat/management/commands/fixfundingsource.py b/lowfat/management/commands/fixfundingsource.py index effb18da..515be22c 100644 --- a/lowfat/management/commands/fixfundingsource.py +++ b/lowfat/management/commands/fixfundingsource.py @@ -22,12 +22,14 @@ def handle(self, *args, **options): ) for fund in funds: fund.funds_from_default = line["new_funding_source_subcategory"] + fund.grant_default = line["funding_source"] print("Changing {}...".format(fund)) fund.save() print("Changed {}...".format(fund)) for expense in Expense.objects.filter(fund=fund): expense.funds_from = line["new_funding_source_subcategory"] + expense.grant_used = line["funding_source"] print("Changing {}...".format(expense)) expense.save() print("Changed {}...".format(expense))