empty strings should also be added as attributes
This commit is contained in:
+1
-3
@@ -20,9 +20,7 @@ class Category(object):
|
|||||||
if self.attributes:
|
if self.attributes:
|
||||||
attributes = SubElement(root, "attributes")
|
attributes = SubElement(root, "attributes")
|
||||||
for k, v in self.attributes.items():
|
for k, v in self.attributes.items():
|
||||||
s = str(v)
|
SubElement(attributes, k).text = str(v)
|
||||||
if s:
|
|
||||||
SubElement(attributes, k).text = s
|
|
||||||
|
|
||||||
return root
|
return root
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user