always display at least current month on reports select menu
This commit is contained in:
parent
90674b2e62
commit
3c7b5a083d
@ -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}
|
||||
|
@ -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>
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user