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:
parent
320ff1bd41
commit
7d3f8cd255
@ -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())
|
||||
|
Loading…
Reference in New Issue
Block a user