always display at least current month on reports select menu
This commit is contained in:
@@ -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>
|
||||
|
||||
|
Reference in New Issue
Block a user