mirror of https://github.com/snachodog/mybuddy.git
Update naps card to pass timedelta directly.
This commit is contained in:
parent
31f747e908
commit
5a57ac7a48
|
@ -14,5 +14,5 @@
|
|||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{% if total.duration__sum %}{{ total.duration__sum|duration_string }}{% endif %}
|
||||
{% if total %}{{ total|duration_string }}{% endif %}
|
||||
{% endblock %}
|
|
@ -148,7 +148,7 @@ def card_sleep_naps_day(child, date=None):
|
|||
instances = models.Sleep.naps.filter(child=child, start__date=date)
|
||||
return {
|
||||
'type': 'sleep',
|
||||
'total': instances.aggregate(Sum('duration')),
|
||||
'total': instances.aggregate(Sum('duration'))['duration__sum'],
|
||||
'count': len(instances)}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue