From f8c55f57cb7e6b486d3730d086e419b629741f74 Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Mon, 20 Feb 2012 09:51:41 +0530 Subject: [PATCH] dont try - with none --- pandora/event/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora/event/models.py b/pandora/event/models.py index dc43796d0..8770ad895 100644 --- a/pandora/event/models.py +++ b/pandora/event/models.py @@ -124,7 +124,7 @@ class Event(models.Model): self.name_find = '||' + self.name + '||'.join(self.alternativeNames) + '||' self.defined = len(filter(None, [getattr(self, key) for key in ('start', 'end', 'startTime', 'endTime')])) > 0 - if self.defined: + if self.endTime and self.startTime: self.durationTime = self.endTime - self.startTime super(Event, self).save(*args, **kwargs)