Merge lp:~hirt/ocb-addons/6.1_calendar_fix_id2real_id into lp:ocb-addons/6.1

Proposed by Etienne Hirt
Status: Merged
Merged at revision: 6823
Proposed branch: lp:~hirt/ocb-addons/6.1_calendar_fix_id2real_id
Merge into: lp:ocb-addons/6.1
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/ocb-addons/6.1_calendar_fix_id2real_id
Reviewer Review Type Date Requested Status
Yann Papouin Approve
Pedro Manuel Baeza Approve
Holger Brunn (Therp) code review Approve
Review via email: mp+194070@code.launchpad.net

Description of the change

[7], [6.1] Fix to avoid that int(base_calendar_id) can return an exception rather than false.

This fix is for bot 7 and 6.1 branch. But prepared on 6.1

To post a comment you must log in.
Revision history for this message
Holger Brunn (Therp) (hbrunn) wrote :

But please also propose the same for 7.0 in order not to introduce regressions in the ocb branches

review: Approve (code review)
Revision history for this message
Holger Brunn (Therp) (hbrunn) wrote :

Oh, and please also link the MP to a bug report

Revision history for this message
Pedro Manuel Baeza (pedro.baeza) wrote :

Thanks for the patch.

Regards.

review: Approve
Revision history for this message
Yann Papouin (yann-papouin) :
review: Approve

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 2012-03-05 14:35:54 +0000
3+++ base_calendar/base_calendar.py 2013-11-06 07:21:57 +0000
4@@ -85,7 +85,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 real_id2base_calendar_id(real_id, recurrent_date):
15 """

Subscribers

People subscribed via source and target branches