[Admin Tools | log4j2]: MenuService.java: [Bug fix] Method "updatePid()" needs to update portalPid in menu and menu items.

This commit is contained in:
Konstantina Galouni 2022-12-16 14:04:57 +02:00
parent 43a4c1a5a4
commit 58f6612945
1 changed files with 9 additions and 0 deletions

View File

@ -382,5 +382,14 @@ public class MenuService {
menuDAO.save(menu);
log.debug("menu saved!");
}
List<MenuItem> menuItems = menuItemDAO.findByPortalPid(old_pid);
if(menuItems != null) {
menuItems.forEach(menuItem -> {
menuItem.setPortalPid(new_pid);
menuItemDAO.save(menuItem);
log.debug("menuItem saved!");
});
}
}
}