Add a precautionary check for the query tool connection cursor to fix the error 'NoneType' object has no attribute '_query'. #7660

This commit is contained in:
Pravesh Sharma 2024-07-18 14:24:50 +05:30 committed by GitHub
parent a75273a714
commit bfcdcdc4f1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -988,8 +988,8 @@ def poll(trans_id):
query_len_data = {
'transaction_status': transaction_status,
'explain_query_length':
get_explain_query_length(
conn._Connection__async_cursor._query)
get_explain_query_length(conn._Connection__async_cursor._query)
if conn._Connection__async_cursor else 0
}
return internal_server_error(result, query_len_data)
elif status == ASYNC_OK: