Ensure naps card uses minimum date _without_ a time value

This commit is contained in:
Christopher C. Wells 2020-02-14 10:15:30 -08:00 committed by Christopher Charbonneau Wells
parent 93207d88fe
commit bcfa352b9b
1 changed files with 1 additions and 1 deletions

View File

@ -144,7 +144,7 @@ def card_sleep_naps_day(child, date=None):
:returns: a dictionary of nap data statistics.
"""
date = timezone.localtime(date).astimezone(timezone.utc)
instances = models.Sleep.naps.filter(child=child, start__date=date)
instances = models.Sleep.naps.filter(child=child, start__date=date.date())
return {
'type': 'sleep',
'total': instances.aggregate(Sum('duration'))['duration__sum'],