fix: resolve captain module lint and rubocop errors

This commit is contained in:
Rodrigo Borba 2026-01-12 19:04:39 -03:00
parent 3c02c7a4c4
commit 459a63528c

View File

@ -36,7 +36,11 @@ class Captain::Reminders::Processor
tool = Captain::Tools::StatusSuitesTool.new(assistant, conversation: conversation) tool = Captain::Tools::StatusSuitesTool.new(assistant, conversation: conversation)
result = tool.execute result = tool.execute
parsed = JSON.parse(result) rescue {} parsed = begin
JSON.parse(result)
rescue StandardError
{}
end
free_suites = parsed['free'] || [] free_suites = parsed['free'] || []
free_suites.any? { |suite| suite['suite'].to_s == @reminder.suite_identifier.to_s } free_suites.any? { |suite| suite['suite'].to_s == @reminder.suite_identifier.to_s }
end end