From da85d62694603561667e38802e2e9b9e69424c1e Mon Sep 17 00:00:00 2001 From: hugocasa Date: Thu, 8 Oct 2026 18:37:54 +0200 Subject: [PATCH] fix: skip the resource type fingerprint query when no index is loaded Co-Authored-By: Claude Opus 5.5 --- backend/windmill-api-embeddings/src/lib.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/backend/windmill-api-embeddings/src/lib.rs b/backend/windmill-api-embeddings/src/lib.rs index 178f77b706..52948fb1f9 100644 --- a/backend/windmill-api-embeddings/src/lib.rs +++ b/backend/windmill-api-embeddings/src/lib.rs @@ -736,6 +736,9 @@ async fn resource_type_index( /// unsearchable until then; this re-indexes the resource types alone when the table changed. #[cfg(feature = "embedding")] pub async fn refresh_resource_type_embeddings(pg_db: &Pool) -> Result<()> { + if EMBEDDINGS_DB.read().await.is_none() { + return Ok(()); + } let fingerprint = resource_types_fingerprint(pg_db).await?; let (model_instance, hub_embeddings, custom_vectors) = match EMBEDDINGS_DB.read().await.as_ref() {