From cdb0817fc1791c3a22b3dadd17efbb61283c6119 Mon Sep 17 00:00:00 2001 From: David Taylor Date: Thu, 21 May 2015 22:25:18 +0100 Subject: [PATCH] Caught type-error for old events --- RIGS/rigboard.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/RIGS/rigboard.py b/RIGS/rigboard.py index a24e7be8..9190c046 100644 --- a/RIGS/rigboard.py +++ b/RIGS/rigboard.py @@ -210,7 +210,10 @@ class EventRevisions(generic.ListView): old.append(v) new.append(d2[k]) except KeyError: - old.update({k: v}) + old.append({k: v}) + except TypeError: + # avoids issues with naive vs tz-aware datetimes + old.append({k: v}) return zip(key,old,new)