Skip to content

Commit

Permalink
improve code
Browse files Browse the repository at this point in the history
Signed-off-by: Lincoln Simba <[email protected]>
  • Loading branch information
lincmba committed Jan 22, 2019
1 parent e538557 commit b26c679
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions onadata/libs/renderers/renderers.py
Original file line number Diff line number Diff line change
Expand Up @@ -251,11 +251,10 @@ def _to_xml(self, xml, data):
elif isinstance(data, dict):
for (key, value) in iteritems(data):
if key not in FORMLIST_MANDATORY_FIELDS and value is None:
pass
else:
xml.startElement(key, {})
self._to_xml(xml, value)
xml.endElement(key)
continue
xml.startElement(key, {})
self._to_xml(xml, value)
xml.endElement(key)

elif data is None:
# Don't output any value
Expand Down

0 comments on commit b26c679

Please sign in to comment.