diff options
author | s0 <s0@s0.is> | 2022-12-16 01:56:48 +1100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-15 15:56:48 +0100 |
commit | 52540771b0e7f69d2d1e0c21b558976000e807e5 (patch) | |
tree | 953fe9a5fafc6cfc8d484bfd61f20e03ae5b9666 /app | |
parent | 441cac758f759ba16744f80e1d981e84f415bd29 (diff) |
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.
Diffstat (limited to 'app')
-rw-r--r-- | app/lib/admin/system_check/elasticsearch_check.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/app/lib/admin/system_check/elasticsearch_check.rb b/app/lib/admin/system_check/elasticsearch_check.rb index 8aee18267..a63988224 100644 --- a/app/lib/admin/system_check/elasticsearch_check.rb +++ b/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 |