]> git.proxmox.com Git - proxmox-perl-rs.git/commitdiff
notify: adapt to Option<Vec<T>> to Vec<T> changes in proxmox_notify
authorLukas Wagner <l.wagner@proxmox.com>
Tue, 21 May 2024 13:31:43 +0000 (15:31 +0200)
committerWolfgang Bumiller <w.bumiller@proxmox.com>
Tue, 4 Jun 2024 08:40:53 +0000 (10:40 +0200)
Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
Tested-by: Max Carrara <m.carrara@proxmox.com>
Reviewed-by: Max Carrara <m.carrara@proxmox.com>
common/src/notify.rs

index 00a6056fe951a67fef0c605dc3a36284a4e3fd60..e1b006bd038088295729a34c7b1b45cbe979f83b 100644 (file)
@@ -153,8 +153,8 @@ mod export {
             &mut config,
             SendmailConfig {
                 name,
-                mailto,
-                mailto_user,
+                mailto: mailto.unwrap_or_default(),
+                mailto_user: mailto_user.unwrap_or_default(),
                 from_address,
                 author,
                 comment,
@@ -329,8 +329,8 @@ mod export {
                 port,
                 mode,
                 username,
-                mailto,
-                mailto_user,
+                mailto: mailto.unwrap_or_default(),
+                mailto_user: mailto_user.unwrap_or_default(),
                 from_address,
                 author,
                 comment,
@@ -429,10 +429,10 @@ mod export {
             &mut config,
             MatcherConfig {
                 name,
-                match_severity,
-                match_field,
-                match_calendar,
-                target,
+                match_severity: match_severity.unwrap_or_default(),
+                match_field: match_field.unwrap_or_default(),
+                match_calendar: match_calendar.unwrap_or_default(),
+                target: target.unwrap_or_default(),
                 mode,
                 invert_match,
                 comment,