Compare commits
2 Commits
38416fc6d7
...
eb005eb5c8
Author | SHA1 | Date |
---|---|---|
chris | eb005eb5c8 | |
chris | 9072c5a477 |
|
@ -1,3 +1,4 @@
|
|||
*.pyc
|
||||
__pycache__/
|
||||
venv/
|
||||
pat
|
||||
|
|
|
@ -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 New Issue