Add more checks when adding store

This commit is contained in:
crschnick 2023-06-06 18:01:39 +00:00
parent 84e054978c
commit b997e7674d

View file

@ -267,6 +267,18 @@ public class GuiDsStoreCreator extends MultiStepComp.Step<CompStructure<?>> {
}
}
if (DataStorage.get().getStoreEntryIfPresent(name.getValue()).isPresent()) {
messageProp.setValue("Store with name " + name.getValue() + " does already exist");
changedSinceError.setValue(false);
return false;
}
if (DataStorage.get().getStoreEntryIfPresent(entry.getValue().getStore()).isPresent()) {
messageProp.setValue("A store with the same configuration does already exist");
changedSinceError.setValue(false);
return false;
}
if (!validator.getValue().validate()) {
var msg = validator
.getValue()