Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -826,12 +826,6 @@ public Configuration updateConfiguration(final UpdateCfgCmd cmd) throws InvalidP
return _configDao.findByName(name);
}

value = value.trim();

if (value.isEmpty() || value.equals("null")) {
value = null;
}

String scope = null;
Long id = null;
int paramCountCheck = 0;
Expand Down Expand Up @@ -871,6 +865,12 @@ public Configuration updateConfiguration(final UpdateCfgCmd cmd) throws InvalidP
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);
Expand Down