From d678095d890861001ffe3648a348f682d048bba4 Mon Sep 17 00:00:00 2001 From: Daniel Mach Date: Tue, 10 Oct 2023 16:16:44 +0200 Subject: [PATCH] Fix core.change_request_state_template() to always return a string --- osc/core.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osc/core.py b/osc/core.py index ba47e934..5005a977 100644 --- a/osc/core.py +++ b/osc/core.py @@ -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':