Skip to content

Commit

Permalink
Fix grant_default and grant_used with fixfundingsource.py
Browse files Browse the repository at this point in the history
  • Loading branch information
rgaiacs committed Apr 12, 2018
1 parent 7fe6e6b commit 9d368e1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lowfat/management/commands/fixfundingsource.py
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit 9d368e1

Please # to comment.