mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
Add empty config value for scope based config setting (#5551)
This commit is contained in:
parent
e198edfaf8
commit
e4beb1f955
@ -826,12 +826,6 @@ public class ConfigurationManagerImpl extends ManagerBase implements Configurati
|
||||
return _configDao.findByName(name);
|
||||
}
|
||||
|
||||
value = value.trim();
|
||||
|
||||
if (value.isEmpty() || value.equals("null")) {
|
||||
value = null;
|
||||
}
|
||||
|
||||
String scope = null;
|
||||
Long id = null;
|
||||
int paramCountCheck = 0;
|
||||
@ -871,6 +865,12 @@ public class ConfigurationManagerImpl extends ManagerBase implements Configurati
|
||||
throw new InvalidParameterValueException("cannot handle multiple IDs, provide only one ID corresponding to the scope");
|
||||
}
|
||||
|
||||
value = value.trim();
|
||||
|
||||
if (value.isEmpty() || value.equals("null")) {
|
||||
value = (id == null) ? null : "";
|
||||
}
|
||||
|
||||
final String updatedValue = updateConfiguration(userId, name, catergory, value, scope, id);
|
||||
if (value == null && updatedValue == null || updatedValue.equalsIgnoreCase(value)) {
|
||||
return _configDao.findByName(name);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user