Skip to content

Commit

Permalink
Fix crash in elasticsearch_check.rb (mastodon#21006)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
cortices authored and Nonexistent committed Jan 11, 2023
1 parent 365a42f commit 21948a5
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions app/lib/admin/system_check/elasticsearch_check.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ def required_version
end

def compatible_version?
return false if running_version.nil?
Gem::Version.new(running_version) >= Gem::Version.new(required_version)
end
end

0 comments on commit 21948a5

Please sign in to comment.