fix: support last day of month

This commit is contained in:
chris 2020-10-31 11:33:31 +01:00
parent 9072c5a477
commit eb005eb5c8
1 changed files with 2 additions and 2 deletions

View File

@ -35,10 +35,10 @@ def _get_current_limit(budget_id):
).json()
budgets.extend(budget_json.get('data'))
today = datetime.datetime.today()
today = datetime.datetime.combine(datetime.date.today(), datetime.datetime.min.time())
return [
budget for budget in budgets
if today > dateutil.parser.parse(budget.get('attributes').get('start')) and today < dateutil.parser.parse(budget.get('attributes').get('end'))
if today > dateutil.parser.parse(budget.get('attributes').get('start')) and today <= dateutil.parser.parse(budget.get('attributes').get('end'))
][0]