From 9d8fe572bb3d1afbd6eea367628f3ee078c3312c Mon Sep 17 00:00:00 2001 From: Patrick Smith Date: Thu, 6 Sep 2018 09:57:15 -0400 Subject: [PATCH] Default to current month for reporting --- atst/routes/workspaces.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/atst/routes/workspaces.py b/atst/routes/workspaces.py index 131fcc30..d6da53ab 100644 --- a/atst/routes/workspaces.py +++ b/atst/routes/workspaces.py @@ -78,8 +78,9 @@ def workspace_reports(workspace_id): ) alternate_reports = http_request.args.get("alternate") - month = http_request.args.get("month", 3) - year = http_request.args.get("year", 2019) + today = date.today() + month = http_request.args.get("month", today.month) + year = http_request.args.get("year", today.year) current_month = date(int(year), int(month), 15) prev_month = current_month - timedelta(days=28) two_months_ago = prev_month - timedelta(days=28)