Skip to content

Commit cf8fa8f

Browse files
committed
Fixed the bug that caused pg query crashes
1 parent 6464ce4 commit cf8fa8f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/services/postgresql_query_service.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ def process
3939
result = connection.exec(query_text)
4040

4141
rescue StandardError => e
42-
reset_connection(data_source) if connection.finished?
42+
reset_connection(data_source) if connection&.finished?
4343

4444
puts e
4545
error = { message: e.message }

0 commit comments

Comments
 (0)