diff --git a/crates/dtrack-http/src/admin.rs b/crates/dtrack-http/src/admin.rs index 7dd28db..af0c3b3 100644 --- a/crates/dtrack-http/src/admin.rs +++ b/crates/dtrack-http/src/admin.rs @@ -175,10 +175,10 @@ async fn update(State(st): State, Form(form): Form) -> Res *st.client.write().await = new_client; *st.config.write().await = cfg.clone(); - if let Some(path) = &st.config_path { - if let Err(e) = cfg.save(path) { - tracing::error!("Config konnte nicht gespeichert werden: {e}"); - } + if let Some(path) = &st.config_path + && let Err(e) = cfg.save(path) + { + tracing::error!("Config konnte nicht gespeichert werden: {e}"); } Html(render(&cfg, true).into_string()).into_response()