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
|
from itertools import groupby
|
||||||
|
|
||||||
|
|
||||||
@ -237,7 +236,6 @@ class Reports:
|
|||||||
if workspace.name in REPORT_FIXTURE_MAP:
|
if workspace.name in REPORT_FIXTURE_MAP:
|
||||||
months = REPORT_FIXTURE_MAP[workspace.name]["cumulative"]
|
months = REPORT_FIXTURE_MAP[workspace.name]["cumulative"]
|
||||||
else:
|
else:
|
||||||
this_month = datetime.today().strftime("%m/%Y")
|
months = {}
|
||||||
months = {this_month: {"spend": 0, "cumulative": 0}}
|
|
||||||
|
|
||||||
return {"months": months}
|
return {"months": months}
|
||||||
|
@ -335,6 +335,9 @@
|
|||||||
{{ month.strftime('%B %Y') }}
|
{{ month.strftime('%B %Y') }}
|
||||||
</option>
|
</option>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
{% if not cumulative_budget["months"] %}
|
||||||
|
<option>{{ current_month.strftime('%B %Y') }}</option>
|
||||||
|
{% endif %}
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user