Fix: export tables en XML si id de colonnes numeriques

This commit is contained in:
Emmanuel Viennet 2021-09-24 00:33:18 +02:00
parent 2add3e12cc
commit 9c5408f503
1 changed files with 2 additions and 2 deletions

View File

@ -573,7 +573,7 @@ class GenTable(object):
""" """
doc = ElementTree.Element( doc = ElementTree.Element(
self.xml_outer_tag, self.xml_outer_tag,
id=self.table_id, id=str(self.table_id),
origin=self.origin or "", origin=self.origin or "",
caption=self.caption or "", caption=self.caption or "",
) )
@ -587,7 +587,7 @@ class GenTable(object):
v = row.get(cid, "") v = row.get(cid, "")
if v is None: if v is None:
v = "" v = ""
x_cell = ElementTree.Element(cid, value=str(v)) x_cell = ElementTree.Element(str(cid), value=str(v))
x_row.append(x_cell) x_row.append(x_cell)
return sco_xml.XML_HEADER + ElementTree.tostring(doc).decode(scu.SCO_ENCODING) return sco_xml.XML_HEADER + ElementTree.tostring(doc).decode(scu.SCO_ENCODING)