Do not show success message, when there is an error saving the data in

the DataGrid.

Fixes #2907
This commit is contained in:
Akshay Joshi
2017-11-30 12:53:12 +05:30
committed by Ashesh Vashi
parent 281b6c91b5
commit ea82d92e41

View File

@@ -2422,6 +2422,7 @@ define('tools.querytool', [
}
grid.setSelectedRows([]);
// Reset data store
self.data_store = {
'added': {},
@@ -2429,13 +2430,15 @@ define('tools.querytool', [
'deleted': {},
'added_index': {},
'updated_index': {}
}
};
// Reset old primary key data now
self.primary_keys_data = {};
// Clear msgs after successful save
$('.sql-editor-message').html('');
alertify.success(gettext("Data saved successfully."));
} else {
// Something went wrong while saving data on the db server
$("#btn-flash").prop('disabled', false);
@@ -2476,7 +2479,6 @@ define('tools.querytool', [
self.trigger('pgadmin-sqleditor:loading-icon:hide');
grid.invalidate();
alertify.success(gettext("Data saved successfully."));
if (self.close_on_save) {
self.close();
}