mirror of
https://git.proxmox.com/git/proxmox-backup
synced 2025-05-21 20:29:07 +00:00
server: sync email notification: adapt template for local sync jobs
Add a guard clause that checks `job.remote`, otherwise the template fails to render to to handlebars being configured in strict mode. Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
This commit is contained in:
parent
ca8cf67187
commit
6ef0238f99
@ -92,9 +92,12 @@ const SYNC_OK_TEMPLATE: &str = r###"
|
||||
|
||||
Job ID: {{job.id}}
|
||||
Datastore: {{job.store}}
|
||||
{{#if job.remote~}}
|
||||
Remote: {{job.remote}}
|
||||
Remote Store: {{job.remote-store}}
|
||||
|
||||
{{else~}}
|
||||
Local Source Store: {{job.remote-store}}
|
||||
{{/if}}
|
||||
Synchronization successful.
|
||||
|
||||
|
||||
@ -108,9 +111,12 @@ const SYNC_ERR_TEMPLATE: &str = r###"
|
||||
|
||||
Job ID: {{job.id}}
|
||||
Datastore: {{job.store}}
|
||||
{{#if job.remote~}}
|
||||
Remote: {{job.remote}}
|
||||
Remote Store: {{job.remote-store}}
|
||||
|
||||
{{else~}}
|
||||
Local Source Store: {{job.remote-store}}
|
||||
{{/if}}
|
||||
Synchronization failed: {{error}}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user