Fixed code smell 'Update this function so that its implementation is not identical' reported by SonarQube.

This commit is contained in:
Akshay Joshi
2022-01-28 17:20:34 +05:30
parent 37d82d457c
commit 1a89c1f85f
72 changed files with 579 additions and 4126 deletions

View File

@@ -543,6 +543,12 @@ define([
deleteUserCell = Backgrid.Extension.DeleteCell.extend({
raiseError: function() {
Notify.error(
gettext('Error during deleting user.')
);
},
changeOwnership: function(res, uid) {
let self = this;
@@ -695,11 +701,7 @@ define([
alertify.changeOwnershipDialog().destroy();
alertify.UserManagement().destroy();
},
error: function() {
Notify.error(
gettext('Error during deleting user.')
);
},
error: self.raiseError,
});
alertify.changeOwnershipDialog().destroy();
},
@@ -745,11 +747,7 @@ define([
success: function() {
Notify.success(gettext('User deleted.'));
},
error: function() {
Notify.error(
gettext('Error during deleting user.')
);
},
error: self.raiseError,
});
},
function() {