Ensure email_recipients is always a list
This commit is contained in:
parent
8ca6976892
commit
de58efdaa9
|
@ -3559,10 +3559,14 @@ class API_VM_Autobackup_Root(Resource):
|
||||||
id: Message
|
id: Message
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
email_recipients = reqargs.get("email_recipients", None)
|
||||||
|
if email_recipients is not None and not isinstance(email_recipients, list):
|
||||||
|
email_recipients = [email_recipients]
|
||||||
|
|
||||||
task = run_celery_task(
|
task = run_celery_task(
|
||||||
"cluster.autobackup",
|
"cluster.autobackup",
|
||||||
force_full=reqargs.get("force_full", False),
|
force_full=reqargs.get("force_full", False),
|
||||||
email_recipients=reqargs.get("email_recipients", None),
|
email_recipients=email_recipients,
|
||||||
run_on="primary",
|
run_on="primary",
|
||||||
)
|
)
|
||||||
return (
|
return (
|
||||||
|
|
Loading…
Reference in New Issue