1
0
mirror of https://github.com/openSUSE/osc.git synced 2024-11-10 06:46:15 +01:00

Only serialize "creator" attribute if it is neither None nor the empty string

Follow-up fix for commit eed18c6. Storing an empty creator attribute may lead
to validation errors etc. (see also PR#295).
This commit is contained in:
Marcus Huewe 2017-05-08 21:41:29 +02:00
parent 320ff1bd41
commit 7d3f8cd255

View File

@ -2752,7 +2752,7 @@ class Request:
root = ET.Element('request')
if self.reqid is not None:
root.set('id', self.reqid)
if self.creator is not None:
if self.creator:
root.set('creator', self.creator)
for action in self.actions:
root.append(action.to_xml())