mirror of
https://github.com/memohai/Memoh.git
synced 2026-04-25 07:00:48 +09:00
fix(settings): search_provider_id NULL scan failure
The ::text cast on search_providers.id prevented sqlc from inferring nullability via LEFT JOIN, generating a non-nullable string field that crashes when the bot has no search provider bound.
This commit is contained in:
@@ -7,7 +7,7 @@ SELECT
|
||||
chat_models.model_id AS chat_model_id,
|
||||
memory_models.model_id AS memory_model_id,
|
||||
embedding_models.model_id AS embedding_model_id,
|
||||
search_providers.id::text AS search_provider_id
|
||||
search_providers.id AS search_provider_id
|
||||
FROM bots
|
||||
LEFT JOIN models AS chat_models ON chat_models.id = bots.chat_model_id
|
||||
LEFT JOIN models AS memory_models ON memory_models.id = bots.memory_model_id
|
||||
@@ -37,7 +37,7 @@ SELECT
|
||||
chat_models.model_id AS chat_model_id,
|
||||
memory_models.model_id AS memory_model_id,
|
||||
embedding_models.model_id AS embedding_model_id,
|
||||
search_providers.id::text AS search_provider_id
|
||||
search_providers.id AS search_provider_id
|
||||
FROM updated
|
||||
LEFT JOIN models AS chat_models ON chat_models.id = updated.chat_model_id
|
||||
LEFT JOIN models AS memory_models ON memory_models.id = updated.memory_model_id
|
||||
|
||||
Reference in New Issue
Block a user