Avoid extra XML elements in views

Non-view modules get called and add empty "actions", "builders" and
other XML elements to view XML tags where they are not supposed to be,
this causes Jenkins "Old data" warnings

Change-Id: Ie031192dca7ac0920e0953d533ed15c22db91022
Story: 2002159
Task: 20008
This commit is contained in:
Aigars Mahinovs 2018-08-13 12:39:58 +02:00
parent b23394b47b
commit 58c51178b3
1 changed files with 2 additions and 1 deletions

View File

@ -90,7 +90,8 @@ class XmlGenerator(object):
Mod = ep.load()
mod = Mod(self.registry)
xml = mod.root_xml(data)
self._gen_xml(xml, data)
if "view-type" not in data:
self._gen_xml(xml, data)
obj = XmlJob(xml, data['name'])
return obj