Skip to content
Snippets Groups Projects
Commit 9b8632f6 authored by srosse's avatar srosse
Browse files

OO-1936: recreate missing business group on copy

parent 12962b58
No related branches found
No related tags found
No related merge requests found
......@@ -1031,9 +1031,12 @@ public class ProjectBrokerCourseNode extends GenericCourseNode implements Assess
Long originalGroupKey = project.getProjectGroup().getKey();
Long copiedGroupKey = envMapper.toGroupKeyFromOriginalKey(originalGroupKey);
Identity author = envMapper.getAuthor();
BusinessGroup projectGroup = bgs.loadBusinessGroup(copiedGroupKey);
if(envMapper.getAuthor() != null) {
Identity author = envMapper.getAuthor();
if (projectGroup == null) {
projectGroup = projectGroupManager.createProjectGroupFor(projectBrokerId, author, project.getTitle(), project.getDescription(), course.getResourceableId());
}
if(author != null) {
bgs.addOwners(author, null, Collections.singletonList(author), projectGroup, null);
}
......
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