Skip to content

Commit

Permalink
Fix only first group config considered in persistence manager (openha…
Browse files Browse the repository at this point in the history
…b#3618)

Signed-off-by: Jan N. Klug <github@klug.nrw>
  • Loading branch information
J-N-K committed May 18, 2023
1 parent f92424c commit d87007a
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -189,8 +189,8 @@ private boolean appliesToItem(PersistenceItemConfiguration itemConfig, Item item
} 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
Expand Down

0 comments on commit d87007a

Please sign in to comment.