Prevent duplicate groups in the tree list
All checks were successful
Playwright Tests / test (pull_request) Has been skipped
Build Nginx-based docker image / build-static-assets (push) Successful in 2m33s
Check usage of free licenses / build-static-assets (pull_request) Successful in 30s
Add copyright notice / copyright_notice (pull_request) Successful in 32s

This commit is contained in:
Manuel Bustillo 2025-01-12 23:14:50 +01:00
parent 20bd7f5983
commit f0e6ff9425

View File

@ -35,6 +35,7 @@ export default function GroupsTable({ groups, onUpdate, onEdit, onEditAffinities
return acc;
}, new Map());
groups.forEach(group => group.children = []);
groups.forEach(group => {
if (group.parentId) {
const parent = index.get(group.parentId);