Fix Lint/DuplicateBranch cop (#24766)

This commit is contained in:
Matt Jankowski authored and GitHub committed 2023-05-02 12:57:11 +02:00
1 parent f50105779b
commit 88d33f361f
6 files changed
+56 -31

No files matched your search

+1 -3
View File
@@ -664,9 +664,7 @@ module Mastodon
def remove_index_if_exists!(table, name)
ActiveRecord::Base.connection.remove_index(table, name: name)
rescue ArgumentError
nil
rescue ActiveRecord::StatementInvalid
rescue ArgumentError, ActiveRecord::StatementInvalid
nil
end
end