Hi,

Please find the attached patch to fix the RM #4082 - Download CSV error
displayed for procedure and functions with create script.

The error message in case of any error while downloading the CSV file was
blank, so now it has been displayed.

Thanks,
Khushboo
diff --git a/web/pgadmin/tools/sqleditor/static/js/sqleditor.js b/web/pgadmin/tools/sqleditor/static/js/sqleditor.js
index ec8ab954..6ea45b93 100644
--- a/web/pgadmin/tools/sqleditor/static/js/sqleditor.js
+++ b/web/pgadmin/tools/sqleditor/static/js/sqleditor.js
@@ -3736,7 +3736,15 @@ define('tools.querytool', [
                 pgAdmin, self, err, gettext('Download CSV'), [], true
               );
             }
+
+            if (_.isEmpty(msg)) msg = err.statusText || gettext('Download CSV error');
             alertify.alert(gettext('Download CSV error'), msg);
+            // Enable the execute button
+            $('#btn-flash').prop('disabled', false);
+            $('#btn-download').prop('disabled', false);
+            self.disable_tool_buttons(false);
+            self.trigger(
+              'pgadmin-sqleditor:loading-icon:hide');
           });
 
       },

Reply via email to