[BUG] lp:658126 - Fixed
bzr revid: jam@tinyerp.com-20101125064347-vxgq1lxgjdxd7hdf
This commit is contained in:
@@ -27,6 +27,7 @@ import time
|
||||
import tools
|
||||
import wizard
|
||||
import base64
|
||||
import logging
|
||||
|
||||
class calendar_event_import(osv.osv_memory):
|
||||
"""
|
||||
@@ -56,7 +57,11 @@ class calendar_event_import(osv.osv_memory):
|
||||
id2 = data_obj._get_id(cr, uid, 'caldav', 'view_calendar_event_import_display')
|
||||
if id2:
|
||||
id2 = data_obj.browse(cr, uid, id2, context=context).res_id
|
||||
vals = model_obj.import_cal(cr, uid, base64.decodestring(data['file_path']), context['active_id'], context)
|
||||
vals = None
|
||||
try:
|
||||
vals = model_obj.import_cal(cr, uid, base64.decodestring(data['file_path']), context['active_id'], context)
|
||||
except:
|
||||
raise osv.except_osv(_('Warning !'),_('Invalid format of the ics, file can not be imported'))
|
||||
global cnt
|
||||
if vals:
|
||||
cnt = len(vals)
|
||||
|
||||
Reference in New Issue
Block a user