mirror of
https://github.com/discourse/discourse.git
synced 2025-06-06 23:07:28 +08:00
Connection may be nil
.
This commit is contained in:
@ -56,7 +56,7 @@ class PostgreSQLFallbackHandler
|
||||
connection = ActiveRecord::Base.postgresql_connection(config)
|
||||
is_connection_active = connection.active?
|
||||
ensure
|
||||
connection.disconnect!
|
||||
connection.disconnect! if connection
|
||||
end
|
||||
|
||||
if is_connection_active
|
||||
|
Reference in New Issue
Block a user