mirror of https://github.com/halo-dev/halo
Fixed save options error
parent
29834a9932
commit
9a9295d6c1
|
@ -52,7 +52,7 @@ public class OptionServiceImpl extends AbstractCrudService<Option, Integer> impl
|
||||||
public void save(String key, String value, String source) {
|
public void save(String key, String value, String source) {
|
||||||
Assert.hasText(key, "Option key must not be blank");
|
Assert.hasText(key, "Option key must not be blank");
|
||||||
|
|
||||||
if (StringUtils.isNotBlank(value)) {
|
if (StringUtils.isBlank(value)) {
|
||||||
// If the value is blank, remove the key
|
// If the value is blank, remove the key
|
||||||
optionRepository.removeByOptionKey(key);
|
optionRepository.removeByOptionKey(key);
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in New Issue