From bcfa352b9be70455f2271ae6abacff8f81bda319 Mon Sep 17 00:00:00 2001 From: "Christopher C. Wells" Date: Fri, 14 Feb 2020 10:15:30 -0800 Subject: [PATCH] Ensure naps card uses minimum date _without_ a time value --- dashboard/templatetags/cards.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dashboard/templatetags/cards.py b/dashboard/templatetags/cards.py index 048038e4..c91ef082 100644 --- a/dashboard/templatetags/cards.py +++ b/dashboard/templatetags/cards.py @@ -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'],