From 37c07ff7484b1f03b4182d78f7021a71431a5c37 Mon Sep 17 00:00:00 2001 From: mbecker20 Date: Sat, 25 May 2024 13:43:06 -0700 Subject: [PATCH] only actually add automount if volumes nonempty --- bin/core/src/cloud/hetzner/mod.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bin/core/src/cloud/hetzner/mod.rs b/bin/core/src/cloud/hetzner/mod.rs index 25819fd35..41bd8979b 100644 --- a/bin/core/src/cloud/hetzner/mod.rs +++ b/bin/core/src/cloud/hetzner/mod.rs @@ -99,7 +99,8 @@ pub async fn launch_hetzner_server( let body = CreateServerBody { name: name.to_string(), - automount: Some(automount), + // only actually add automount if volumes nonempty + automount: (!volume_ids.is_empty()).then_some(automount), datacenter: Some(datacenter), location: None, firewalls: firewall_ids