1
0
mirror of https://github.com/openSUSE/osc.git synced 2025-01-12 16:56:15 +01:00

Fix core.change_request_state_template() to always return a string

This commit is contained in:
Daniel Mach 2023-10-10 16:16:44 +02:00
parent c0e2f8c1a3
commit d678095d89

View File

@ -4753,7 +4753,7 @@ def change_request_state_template(req, newstate):
return ''
action = req.actions[0]
tmpl_name = '%srequest_%s_template' % (action.type, newstate)
tmpl = conf.config.get(tmpl_name, '')
tmpl = conf.config.get(tmpl_name, "") or ""
tmpl = tmpl.replace('\\t', '\t').replace('\\n', '\n')
data = {'reqid': req.reqid, 'type': action.type, 'who': req.creator}
if req.actions[0].type == 'submit':