[FIX] website: saving new menu items
simplejson and the builtin json module apparently differ in how they decide to optimise decoding JSON strings to str rather than unicode python strings, so check for basestring rather than one or the other. This may also depend on the Python version. Closes #8726
This commit is contained in:
@@ -627,7 +627,7 @@ class website_menu(osv.osv):
|
||||
self.unlink(cr, uid, to_delete, context=context)
|
||||
for menu in data['data']:
|
||||
mid = menu['id']
|
||||
if isinstance(mid, str):
|
||||
if isinstance(mid, basestring):
|
||||
new_id = self.create(cr, uid, {'name': menu['name']}, context=context)
|
||||
replace_id(mid, new_id)
|
||||
for menu in data['data']:
|
||||
|
||||
Reference in New Issue
Block a user