small nits
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -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)))
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user