crm_caldav: fix for empty 'date_deadline'

bzr revid: p_christ@hol.gr-20101012103830-5439bl3x0gnza141
This commit is contained in:
P. Christeas 2010-10-12 13:38:30 +03:00
parent 96499ac6ce
commit ef59ed0203
1 changed files with 1 additions and 1 deletions

View File

@ -77,7 +77,7 @@ class crm_meeting(osv.osv):
try:
for val in vals:
# Compute value of duration
if 'date_deadline' in val and 'duration' not in val:
if val.get('date_deadline', False) and 'duration' not in val:
start = datetime.strptime(val['date'], '%Y-%m-%d %H:%M:%S')
end = datetime.strptime(val['date_deadline'], '%Y-%m-%d %H:%M:%S')
diff = end - start