Updated reset configuration, to return the updated config value in the response (#6284)

This commit is contained in:
Suresh Kumar Anaparti 2022-04-20 01:37:51 +05:30 committed by GitHub
parent 365966dd0a
commit b2338f7158
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -1043,7 +1043,7 @@ public class ConfigurationManagerImpl extends ManagerBase implements Configurati
s_logger.error("Failed to reset configuration option, name: " + name + ", defaultValue:" + defaultValue);
throw new CloudRuntimeException("Failed to reset configuration value. Please contact Cloud Support.");
}
optionalValue = Optional.ofNullable(configKey != null ? configKey.value() : config.getValue());
optionalValue = Optional.ofNullable(configKey != null ? configKey.value() : _configDao.findByName(name).getValue());
newValue = optionalValue.isPresent() ? optionalValue.get().toString() : defaultValue;
}