Skip to content

Commit fd401eb

Browse files
committed
Fix updateCfg for null scope, it is considered Global
1 parent 9a7de41 commit fd401eb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

server/src/main/java/com/cloud/configuration/ConfigurationManagerImpl.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -978,7 +978,7 @@ public Configuration updateConfiguration(final UpdateCfgCmd cmd) throws InvalidP
978978
return _configDao.findByName(name);
979979
}
980980

981-
ConfigKey.Scope scope = ConfigKey.Scope.Global;
981+
ConfigKey.Scope scope = null;
982982
Long id = null;
983983
int paramCountCheck = 0;
984984

@@ -1224,7 +1224,7 @@ public Pair<Configuration, String> resetConfiguration(final ResetCfgCmd cmd) thr
12241224

12251225
private String getConfigurationValueInScope(ConfigurationVO config, String name, ConfigKey.Scope scope, Long id) {
12261226
String configValue;
1227-
if (ConfigKey.Scope.Global.equals(scope)) {
1227+
if (scope == null || ConfigKey.Scope.Global.equals(scope)) {
12281228
configValue = config.getValue();
12291229
} else {
12301230
ConfigKey<?> configKey = _configDepot.get(name);

0 commit comments

Comments
 (0)