From e37070097adebe37eaf3f95d71a5005b749f3ff3 Mon Sep 17 00:00:00 2001 From: Eevee Date: Tue, 17 Aug 2010 22:00:15 -0700 Subject: [PATCH] Fix crash on viewing the front page the first time. --- splinext/frontpage/controllers/frontpage.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/splinext/frontpage/controllers/frontpage.py b/splinext/frontpage/controllers/frontpage.py index a77edb2..fee79aa 100644 --- a/splinext/frontpage/controllers/frontpage.py +++ b/splinext/frontpage/controllers/frontpage.py @@ -79,9 +79,9 @@ class FrontPageController(BaseController): times.append( int(source['frontpage-last-seen-time']) ) except (KeyError, ValueError): pass - last_seen_time = datetime.datetime.fromtimestamp(max(times)) - if last_seen_time: + if times: + last_seen_time = datetime.datetime.fromtimestamp(max(times)) for update in updates: if update.time > last_seen_time: c.last_seen_item = update -- 2.7.4