Skip to content
Snippets Groups Projects
Commit 747c0b1f authored by srosse's avatar srosse
Browse files

OO-1128: make a unique list of relations before looping and adding the relations area to group

parent f26eee9a
No related branches found
No related tags found
No related merge requests found
......@@ -304,8 +304,9 @@ public class BusinessGroupImportExport {
// get memberships
List<String> memberships = group.areaRelations;
if(memberships != null) {
for (String membership : memberships) {
if(memberships != null && memberships.size() > 0) {
Set<String> uniqueMemberships = new HashSet<>(memberships);
for (String membership : uniqueMemberships) {
BGArea area = areaManager.findBGArea(membership, re.getOlatResource());
if (area == null) {
throw new AssertException("Group-Area-Relationship in export, but area was not created during import.");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment