Commit 042c7fb1 authored by De Boissieu Florian's avatar De Boissieu Florian

fix set method for list attributes

--HG--
branch : settersOptions
parent 02903f10
......@@ -4764,9 +4764,9 @@ def generateGettersAndSetters(wrt, prefix, element):
wrt(' def get%s(self): return self.%s\n' % (capName, varname))
wrt(' def set%s(self, value):\n' % (capName))
wrt(' if value is not None:\n')
wrt(' checkclass(value, {})\n'.format(prefix+child.attrs['type']))
if child.getType() == SequenceType:
wrt(' for v in value\n')
wrt(' checkclass(value, {})\n'.format(prefix+child.getType()))
if child.getMaxOccurs() > 1:
wrt(' for v in value:\n')
wrt(' v.parent = self\n')
else:
wrt(' value.parent = self\n')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment