Fixed the bug that caused pg query crashes

This commit is contained in:
navaneeth 2021-05-28 00:04:29 +05:30
parent 6464ce423e
commit cf8fa8fa47

View file

@ -39,7 +39,7 @@ class PostgresqlQueryService
result = connection.exec(query_text)
rescue StandardError => e
reset_connection(data_source) if connection.finished?
reset_connection(data_source) if connection&.finished?
puts e
error = { message: e.message }