From a3c9cd736342b5dd8e408c64e82ddf9af71884c8 Mon Sep 17 00:00:00 2001 From: Rishabh Date: Thu, 24 Jan 2019 12:46:02 +0530 Subject: [PATCH] FIX: Don't send extra_data when exporting results to JSON The extra data is needed to render avatars and user metadata when rendering results in the browser, we can skip this data for JSON exports to reduce bloat --- plugin.rb | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/plugin.rb b/plugin.rb index e67cb0e..8f86bc0 100644 --- a/plugin.rb +++ b/plugin.rb @@ -1115,9 +1115,12 @@ SQL default_limit: DataExplorer::QUERY_RESULT_MAX_LIMIT } json[:explain] = result[:explain] if opts[:explain] - ext = DataExplorer.add_extra_data(pg_result) - json[:colrender] = ext[1] - json[:relations] = ext[0] + + if !params[:download] + ext = DataExplorer.add_extra_data(pg_result) + json[:colrender] = ext[1] + json[:relations] = ext[0] + end json[:rows] = pg_result.values