From f22bfcfeddeaaff8ec43d47404587db3f753d846 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20H=C3=A4ublein?= Date: Sun, 6 Feb 2022 16:56:45 +0100 Subject: [PATCH] hide feeding_day card when no amount is stored with feedings --- 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 8036871d..76a0d4aa 100644 --- a/dashboard/templatetags/cards.py +++ b/dashboard/templatetags/cards.py @@ -118,7 +118,7 @@ def card_feeding_day(context, child, date=None): total = sum([instance.amount for instance in instances if instance.amount]) count = len(instances) - empty = len(instances) == 0 + empty = len(instances) == 0 or total == 0 return { 'type': 'feeding',