small nits

This commit is contained in:
Ruben Fiszel
2025-03-26 22:23:22 +01:00
parent 3afc72f37f
commit a3d99654a9
2 changed files with 15 additions and 8 deletions

View File

@@ -500,7 +500,10 @@ Windmill Community Edition {GIT_VERSION}
#[cfg(feature = "tantivy")]
let should_index_jobs = mode == Mode::Indexer || mode_and_addons.indexer;
reload_indexer_config(&db).await;
#[cfg(feature = "tantivy")]
if should_index_jobs {
reload_indexer_config(&db).await;
}
#[cfg(feature = "tantivy")]
let (index_reader, index_writer) = if should_index_jobs {

View File

@@ -691,14 +691,18 @@ pub async fn get_variable_or_self(path: String, db: &DB, w_id: &str) -> Result<S
&path,
&w_id
)
.fetch_one(db)
.fetch_optional(db)
.await?;
let mut value = record.value;
if record.is_secret {
let mc = build_crypt(db, w_id).await?;
value = decrypt(&mc, value)?;
}
if let Some(record) = record {
let mut value = record.value;
if record.is_secret {
let mc = build_crypt(db, w_id).await?;
value = decrypt(&mc, value)?;
}
Ok(value)
Ok(value)
} else {
Err(Error::NotFound(format!("Variable {} not found", path)))
}
}