Fixes following code smell reported by SonarQube:

1) Replace this if-then-else flow by a single return statement
 2) Remove the unnecessary boolean literals.
This commit is contained in:
Akshay Joshi
2022-09-08 19:56:02 +05:30
parent 7086719640
commit b8f63adf41
47 changed files with 193 additions and 598 deletions

View File

@@ -194,9 +194,7 @@ export function getSaveOptSchema(fieldOptions) {
}
function isVisible () {
if (!_.isUndefined(this.backupType) && this.backupType === 'server')
return false;
return true;
return !(!_.isUndefined(this.backupType) && this.backupType === 'server');
}
export class QueryOptionSchema extends BaseUISchema {
@@ -240,9 +238,7 @@ export class QueryOptionSchema extends BaseUISchema {
disabled: false,
group: gettext('Queries'),
visible: function() {
if (!_.isUndefined(obj.backupType) && obj.backupType === 'server')
return false;
return true;
return !(!_.isUndefined(obj.backupType) && obj.backupType === 'server');
},
}, {
id: 'include_drop_database',