Skip to content

A platform for community discussion. Free, open, simple.

FIX: use blank? check for role_arn validation (#36009)

Rafael dos Santos Silva9bb15488bdcf
diff --git a/plugins/discourse-ai/app/models/llm_model.rb b/plugins/discourse-ai/app/models/llm_model.rb
index 8e27e779cb5..c1d58aa47db 100644
--- a/plugins/discourse-ai/app/models/llm_model.rb
+++ b/plugins/discourse-ai/app/models/llm_model.rb
@@ -193,7 +193,7 @@ class LlmModel < ActiveRecord::Base
return nil unless provider == BEDROCK_PROVIDER_NAME
role_arn = lookup_custom_param("role_arn")
- return nil unless role_arn
+ return nil if role_arn.blank?
# Invalidate cache if role_arn changed
if @cached_role_arn != role_arn