Hi,
Please find the attached patch to fix RM #2291: Error highlighting broken.
Murtuza / Akshay,
Can you please review the patch?
Thanks,
Khushboo
diff --git a/web/pgadmin/tools/sqleditor/__init__.py b/web/pgadmin/tools/sqleditor/__init__.py
index f08b02e..0444377 100644
--- a/web/pgadmin/tools/sqleditor/__init__.py
+++ b/web/pgadmin/tools/sqleditor/__init__.py
@@ -481,8 +481,10 @@ def poll(trans_id):
# Check the transaction and connection status
status, error_msg, conn, trans_obj, session_obj = check_transaction_status(trans_id)
if status and conn is not None and session_obj is not None:
- status, result = conn.poll()
- if status == ASYNC_OK:
+ status, result = conn.poll(formatted_exception_msg=True)
+ if not status:
+ return internal_server_error(result)
+ elif status == ASYNC_OK:
status = 'Success'
rows_affected = conn.rows_affected()
diff --git a/web/pgadmin/tools/sqleditor/templates/sqleditor/js/sqleditor.js b/web/pgadmin/tools/sqleditor/templates/sqleditor/js/sqleditor.js
index eed0e09..1bda067 100644
--- a/web/pgadmin/tools/sqleditor/templates/sqleditor/js/sqleditor.js
+++ b/web/pgadmin/tools/sqleditor/templates/sqleditor/js/sqleditor.js
@@ -1843,6 +1843,8 @@ define(
msg = e.responseJSON.errormsg;
self.update_msg_history(false, msg);
+ // Highlight the error in the sql panel
+ self._highlight_error(msg);
}
});
}, self.POLL_FALLBACK_TIME());
--
Sent via pgadmin-hackers mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers