From bcd6f3f429202fe8255920455e43a1cc082aff16 Mon Sep 17 00:00:00 2001 From: Rohit Bhati Date: Mon, 30 Dec 2024 11:56:24 +0530 Subject: [PATCH] Fix a formatting issue in View/Edit tool generated SQL where some filters are applied. #8254 --- .../tools/sqleditor/static/js/components/QueryToolComponent.jsx | 2 +- web/pgadmin/tools/sqleditor/static/js/show_view_data.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/web/pgadmin/tools/sqleditor/static/js/components/QueryToolComponent.jsx b/web/pgadmin/tools/sqleditor/static/js/components/QueryToolComponent.jsx index 4f0ac6482..c813175bf 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 5462c73e3..971cf938f 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,