diff --git a/managed/src/main/java/com/yugabyte/yw/commissioner/tasks/subtasks/BackupTable.java b/managed/src/main/java/com/yugabyte/yw/commissioner/tasks/subtasks/BackupTable.java index a3bae1ea291d..112e16410c55 100644 --- a/managed/src/main/java/com/yugabyte/yw/commissioner/tasks/subtasks/BackupTable.java +++ b/managed/src/main/java/com/yugabyte/yw/commissioner/tasks/subtasks/BackupTable.java @@ -53,7 +53,7 @@ public void run() { try { Universe universe = Universe.get(taskParams().universeUUID); Map config = universe.getConfig(); - if (config.isEmpty() || config.get(Universe.TAKE_BACKUPS).equals("true")) { + if (config.isEmpty() || config.getOrDefault(Universe.TAKE_BACKUPS, "true").equals("true")) { ShellProcessHandler.ShellResponse response = tableManager.createBackup(taskParams()); JsonNode jsonNode = Json.parse(response.message); if (response.code != 0 || jsonNode.has("error")) { diff --git a/managed/ui/src/components/common/forms/fields/YBFormSelect.js b/managed/ui/src/components/common/forms/fields/YBFormSelect.js index da3bc42fbf5e..c92315cfadd1 100644 --- a/managed/ui/src/components/common/forms/fields/YBFormSelect.js +++ b/managed/ui/src/components/common/forms/fields/YBFormSelect.js @@ -9,14 +9,13 @@ import Select from 'react-select'; export default class YBFormSelect extends Component { handleChange = option => { const { form, field, onChange } = this.props; - if (isDefinedNotNull(option)) { + if (isDefinedNotNull(onChange) && typeof(onChange) === "function") { + onChange(this.props, option); + } else if (isDefinedNotNull(option)) { form.setFieldValue(field.name, option); } else { form.setFieldValue(field.name, ""); } - if (isDefinedNotNull(onChange) - && typeof(onChange) === "function") - onChange(this.props, option); }; handleBlur = () => { @@ -25,7 +24,7 @@ export default class YBFormSelect extends Component { }; render() { - const { field, options } = this.props; + const { field } = this.props; const customStyles = { option: (provided, state) => ({ ...provided, @@ -78,7 +77,6 @@ export default class YBFormSelect extends Component { margin: "0" }), }; - return (