diff --git a/onadata/libs/renderers/renderers.py b/onadata/libs/renderers/renderers.py index f1d2082981..440cd84ded 100644 --- a/onadata/libs/renderers/renderers.py +++ b/onadata/libs/renderers/renderers.py @@ -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