Merge lp:~hirt/openobject-addons/7.0_oo-calendar_fix_id2real_id into lp:openobject-addons/7.0

Proposed by Etienne Hirt
Status: Needs review
Proposed branch: lp:~hirt/openobject-addons/7.0_oo-calendar_fix_id2real_id
Merge into: lp:openobject-addons/7.0
Diff against target: 15 lines (+4/-1)
1 file modified
base_calendar/base_calendar.py (+4/-1)
To merge this branch: bzr merge lp:~hirt/openobject-addons/7.0_oo-calendar_fix_id2real_id
Reviewer Review Type Date Requested Status
Holger Brunn (Therp) Pending
Review via email: mp+198118@code.launchpad.net

Description of the change

Fix to avoid that int(base_calendar_id) can return an exception rather than false.

To post a comment you must log in.

Unmerged revisions

9681. By Etienne Hirt

[Fix] avoid exception when converting id2realid in base_calendar

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'base_calendar/base_calendar.py'
2--- base_calendar/base_calendar.py 2013-09-17 09:39:06 +0000
3+++ base_calendar/base_calendar.py 2013-12-06 19:20:37 +0000
4@@ -86,7 +86,10 @@
5 return (int(real_id), real_date, end.strftime("%Y-%m-%d %H:%M:%S"))
6 return int(real_id)
7
8- return base_calendar_id and int(base_calendar_id) or base_calendar_id
9+ return int(base_calendar_id)
10+
11+ return base_calendar_id
12+
13
14 def get_real_ids(ids):
15 if isinstance(ids, (str, int, long)):