]> git.proxmox.com Git - proxmox-offline-mirror.git/commitdiff
config: properly skip serializing empty weak_crypto
authorFabian Grünbichler <f.gruenbichler@proxmox.com>
Thu, 6 Apr 2023 11:53:43 +0000 (13:53 +0200)
committerFabian Grünbichler <f.gruenbichler@proxmox.com>
Thu, 6 Apr 2023 11:53:43 +0000 (13:53 +0200)
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
src/config.rs

index 0e19c7734c062ec5b0211d05a7ec2231ecf445d3..6323bd80355f8f2de47660a6dbd806e2c2a9beb8 100644 (file)
@@ -149,7 +149,7 @@ pub struct MirrorConfig {
     #[serde(default, flatten)]
     pub skip: SkipConfig,
     /// Whether to allow using weak cryptography algorithms or parameters, deviating from the default policy.
-    #[serde(default)]
+    #[serde(skip_serializing_if = "Option::is_none")]
     pub weak_crypto: Option<String>,
 }