mirror of
https://github.com/discourse/discourse.git
synced 2025-01-19 08:32:45 +08:00
Connection may be nil
.
This commit is contained in:
parent
057571d173
commit
d3003592cd
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user