always display at least current month on reports select menu

This commit is contained in:
dandds 2018-09-25 13:20:15 -04:00
parent 90674b2e62
commit 3c7b5a083d
2 changed files with 4 additions and 3 deletions

View File

@ -1,4 +1,3 @@
from datetime import datetime
from itertools import groupby
@ -237,7 +236,6 @@ class Reports:
if workspace.name in REPORT_FIXTURE_MAP:
months = REPORT_FIXTURE_MAP[workspace.name]["cumulative"]
else:
this_month = datetime.today().strftime("%m/%Y")
months = {this_month: {"spend": 0, "cumulative": 0}}
months = {}
return {"months": months}

View File

@ -335,6 +335,9 @@
{{ month.strftime('%B %Y') }}
</option>
{% endfor %}
{% if not cumulative_budget["months"] %}
<option>{{ current_month.strftime('%B %Y') }}</option>
{% endif %}
</select>
</div>