Merge lp:~midwest/openobject-extension/api_fix into lp:openobject-extension/oerp6.1-stable

Proposed by Kyle Waid
Status: Needs review
Proposed branch: lp:~midwest/openobject-extension/api_fix
Merge into: lp:openobject-extension/oerp6.1-stable
Diff against target: 12 lines (+2/-0)
1 file modified
base_external_referentials/external_osv.py (+2/-0)
To merge this branch: bzr merge lp:~midwest/openobject-extension/api_fix
Reviewer Review Type Date Requested Status
Sébastien BEAU - http://www.akretion.com Pending
Review via email: mp+107447@code.launchpad.net

Description of the change

Magento API can pass an empty multi-selection field as either '' or Array. We map Array to [] to prevent name error

To post a comment you must log in.

Unmerged revisions

326. By Kyle Waid

[FIX] crappy api issue

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'base_external_referentials/external_osv.py'
2--- base_external_referentials/external_osv.py 2012-05-24 10:00:38 +0000
3+++ base_external_referentials/external_osv.py 2012-05-25 19:03:48 +0000
4@@ -1184,6 +1184,8 @@
5 elif external_type == 'list' and isinstance(field_value, (str, unicode)):
6 # external data sometimes returns ',1,2,3' for a list...
7 if field_value:
8+ #In multi selection field in Magento sometimes API can pass empty list as Array
9+ Array = []
10 casted_field = eval(field_value.strip(','))
11 else:
12 casted_field= []

Subscribers

People subscribed via source and target branches