Bugfixes for urls with dates
This commit is contained in:
parent
e10b00f341
commit
bfdb51a558
4 changed files with 7 additions and 20 deletions
|
@ -94,13 +94,7 @@ class LogbookView(HomeAssistantView):
|
|||
def get(self, request, date=None):
|
||||
"""Retrieve logbook entries."""
|
||||
if date:
|
||||
start_date = dt_util.parse_date(date)
|
||||
|
||||
if start_date is None:
|
||||
return self.json_message('Error parsing JSON',
|
||||
HTTP_BAD_REQUEST)
|
||||
|
||||
start_day = dt_util.start_of_local_day(start_date)
|
||||
start_day = dt_util.start_of_local_day(date)
|
||||
else:
|
||||
start_day = dt_util.start_of_local_day()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue