[FIX] orm: allow unicode in inherit views with attribute
When extending a view with position='attributes', prevent crash if view contains unicode char Fixes #706
This commit is contained in:
parent
7e85786b83
commit
59c27970b5
|
@ -2162,7 +2162,7 @@ class BaseModel(object):
|
|||
node.getparent().remove(node)
|
||||
elif pos == 'attributes':
|
||||
for child in spec.getiterator('attribute'):
|
||||
attribute = (child.get('name'), child.text and child.text.encode('utf8') or None)
|
||||
attribute = (child.get('name'), child.text or None)
|
||||
if attribute[1]:
|
||||
node.set(attribute[0], attribute[1])
|
||||
else:
|
||||
|
|
Loading…
Reference in New Issue