Skip to content

Commit

Permalink
Update how we're getting latest filing and balance / debt trends
Browse files Browse the repository at this point in the history
  • Loading branch information
evz committed Jan 10, 2019
1 parent 0f89cc7 commit 5e195ef
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
5 changes: 3 additions & 2 deletions camp_fin/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -911,8 +911,9 @@ def stack_trends(trend):
filing_date = filing.filing_date
date_array = [filing_date.year, filing_date.month, filing_date.day]
debts = (-1 * filing.total_unpaid_debts)
balance_trend.append([filing.closing_balance, *date_array])
debt_trend.append([debts, *date_array])
if filing.closing_balance:
balance_trend.append([filing.closing_balance, *date_array])
debt_trend.append([debts, *date_array])

if summed_filings[0].opening_balance:
first_opening_balance = summed_filings[0].opening_balance
Expand Down
1 change: 0 additions & 1 deletion camp_fin/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -1126,7 +1126,6 @@ def get_context_data(self, **kwargs):
latest_filing = context['object'].entity.filing_set\
.filter(filing_period__exclude_from_cascading=False)\
.exclude(final__isnull=True)\
.exclude(final=False)\
.order_by('-date_added').first()

context['latest_filing'] = latest_filing
Expand Down

0 comments on commit 5e195ef

Please sign in to comment.