Fix only first group config considered in persistence manager (#3618)

Signed-off-by: Jan N. Klug <github@klug.nrw>
This commit is contained in:
J-N-K
2023-05-18 11:00:45 +02:00
committed by GitHub
parent f92424c0b8
commit d87007a585
@@ -189,8 +189,8 @@ public class PersistenceManager implements ItemRegistryChangeListener, StateChan
} else if (itemCfg instanceof PersistenceGroupConfig) {
try {
Item gItem = itemRegistry.getItem(((PersistenceGroupConfig) itemCfg).getGroup());
if (gItem instanceof GroupItem) {
return ((GroupItem) gItem).getAllMembers().contains(item);
if (gItem instanceof GroupItem gItem2 && gItem2.getAllMembers().contains(item)) {
return true;
}
} catch (ItemNotFoundException e) {
// do nothing