dont try - with none
This commit is contained in:
parent
8e0b88d939
commit
f8c55f57cb
1 changed files with 1 additions and 1 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue