Fix crash in elasticsearch_check.rb (#21006)

Nil unwrap causes the admin dashboard to crash/500 when the Chewy client info version number value is nil.
This occurs when running another ES-compatible backend such as MeiliSearch.
Obviously it would be good for chewy to recognise upstream but at least avoiding the crash would be fine.
local
s0 1 year ago committed by GitHub
parent 441cac758f
commit 52540771b0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      app/lib/admin/system_check/elasticsearch_check.rb

@ -34,6 +34,7 @@ class Admin::SystemCheck::ElasticsearchCheck < Admin::SystemCheck::BaseCheck
end
def compatible_version?
return false if running_version.nil?
Gem::Version.new(running_version) >= Gem::Version.new(required_version)
end
end

Loading…
Cancel
Save