Fix some root categories being deletable

This commit is contained in:
crschnick 2023-12-06 16:23:50 +00:00
parent 5274d58c36
commit aa76ce1a94

View file

@ -415,7 +415,11 @@ public abstract class DataStorage {
} }
public void deleteStoreCategory(@NonNull DataStoreCategory cat) { public void deleteStoreCategory(@NonNull DataStoreCategory cat) {
if (cat.getUuid().equals(DEFAULT_CATEGORY_UUID) || cat.getUuid().equals(ALL_CONNECTIONS_CATEGORY_UUID)) { if (cat.getParentCategory() == null) {
return;
}
if (cat.getUuid().equals(DEFAULT_CATEGORY_UUID) || cat.getUuid().equals(PREDEFINED_SCRIPTS_CATEGORY_UUID)) {
return; return;
} }