fix: support last day of month
This commit is contained in:
parent
9072c5a477
commit
eb005eb5c8
1 changed files with 2 additions and 2 deletions
|
@ -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]
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue