diff --git a/web/pgadmin/tools/sqleditor/static/js/components/QueryToolComponent.jsx b/web/pgadmin/tools/sqleditor/static/js/components/QueryToolComponent.jsx index 4f0ac6482e2..c813175bf30 100644 --- a/web/pgadmin/tools/sqleditor/static/js/components/QueryToolComponent.jsx +++ b/web/pgadmin/tools/sqleditor/static/js/components/QueryToolComponent.jsx @@ -365,7 +365,7 @@ export default function QueryToolComponent({params, pgWindow, pgAdmin, selectedN role: selectedConn.role, password: password, dbname: selectedConn.database_name - } : JSON.stringify(qtState.params.sql_filter)) + } : qtState.params.sql_filter) .then(()=>{ setQtStatePartial({ connected: true, diff --git a/web/pgadmin/tools/sqleditor/static/js/show_view_data.js b/web/pgadmin/tools/sqleditor/static/js/show_view_data.js index 5462c73e366..971cf938f96 100644 --- a/web/pgadmin/tools/sqleditor/static/js/show_view_data.js +++ b/web/pgadmin/tools/sqleditor/static/js/show_view_data.js @@ -188,7 +188,7 @@ function showFilterDialog(pgBrowser, item, queryToolMod, transId, let helpUrl = url_for('help.static', {'filename': 'viewdata_filter.html'}); let okCallback = function() { - queryToolMod.launch(transId, gridUrl, false, queryToolTitle, {sql_filter: schema.sessData.filter_sql}); + queryToolMod.launch(transId, gridUrl, false, queryToolTitle, {sql_filter: JSON.stringify(schema.sessData.filter_sql)}); }; pgBrowser.Events.trigger('pgadmin:utility:show', item,