From a1a66f7624a19f964e8a3a50023ca79e03114d46 Mon Sep 17 00:00:00 2001 From: Magnus Hagander Date: Wed, 26 Dec 2012 19:39:58 +0100 Subject: [PATCH] Don't crash when specifying a date with zero messages --- django/archives/mailarchives/views.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/django/archives/mailarchives/views.py b/django/archives/mailarchives/views.py index 41bb8d6..86979b6 100644 --- a/django/archives/mailarchives/views.py +++ b/django/archives/mailarchives/views.py @@ -104,7 +104,7 @@ def monthlist(request, listname): 'months': months, }, NavContext(request, l.listid)) -def get_monthday_info(mlist, l): +def get_monthday_info(mlist, l, d): allmonths = set([m.date.month for m in mlist]) monthdate = None daysinmonth = None @@ -138,7 +138,7 @@ def render_datelist_from(request, l, d, title, to=None): threads = set([m.threadid for m in mlist]) allyearmonths = set([(m.date.year, m.date.month) for m in mlist]) - (yearmonth, daysinmonth) = get_monthday_info(mlist, l) + (yearmonth, daysinmonth) = get_monthday_info(mlist, l, d) r = render_to_response('datelist.html', { 'list': l, @@ -158,7 +158,7 @@ def render_datelist_to(request, l, d, title): threads = set([m.threadid for m in mlist]) allyearmonths = set([(m.date.year, m.date.month) for m in mlist]) - (yearmonth, daysinmonth) = get_monthday_info(mlist, l) + (yearmonth, daysinmonth) = get_monthday_info(mlist, l, d) r = render_to_response('datelist.html', { 'list': l, -- 2.39.5