[FIX] calendar: set context if none
Avoid traceback if no context in get_recurrent_date_by_event when code do: context.get('xx')
This commit is contained in:
parent
e7886c6d75
commit
2e49fc09ff
|
@ -701,6 +701,9 @@ class calendar_event(osv.Model):
|
|||
val = pytz.UTC.localize(val)
|
||||
return val.astimezone(timezone)
|
||||
|
||||
if context is None:
|
||||
context = {}
|
||||
|
||||
timezone = pytz.timezone(context.get('tz') or 'UTC')
|
||||
startdate = pytz.UTC.localize(datetime.strptime(event.start, DEFAULT_SERVER_DATETIME_FORMAT)) # Add "+hh:mm" timezone
|
||||
if not startdate:
|
||||
|
|
Loading…
Reference in New Issue