From 3c7b5a083d5a70115a715376159c0de1358cc897 Mon Sep 17 00:00:00 2001 From: dandds Date: Tue, 25 Sep 2018 13:20:15 -0400 Subject: [PATCH] always display at least current month on reports select menu --- atst/domain/reports.py | 4 +--- templates/workspaces/reports/index.html | 3 +++ 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/atst/domain/reports.py b/atst/domain/reports.py index 23f3860c..15a00812 100644 --- a/atst/domain/reports.py +++ b/atst/domain/reports.py @@ -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} diff --git a/templates/workspaces/reports/index.html b/templates/workspaces/reports/index.html index dac32622..9c74f8ba 100644 --- a/templates/workspaces/reports/index.html +++ b/templates/workspaces/reports/index.html @@ -335,6 +335,9 @@ {{ month.strftime('%B %Y') }} {% endfor %} + {% if not cumulative_budget["months"] %} + + {% endif %}