Bugfixes for urls with dates

This commit is contained in:
Paulus Schoutsen 2016-05-28 10:37:22 -07:00
parent e10b00f341
commit bfdb51a558
4 changed files with 7 additions and 20 deletions

View file

@ -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()