Skip to content

Commit ef5d6f6

Browse files
authored
Merge pull request #151 from UIUCLibrary/i146
Fixes #146 by waiting to flush till after validataion
2 parents 3a01bbd + 311f354 commit ef5d6f6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Module.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1758,7 +1758,7 @@ public function resourceTemplateCreate(Event $event)
17581758
$team = $teams->findOneBy(['id' => $team_id]);
17591759
$trt = new TeamResourceTemplate($team, $resource_template);
17601760
$em->persist($trt);
1761-
$em->flush();
1761+
//note: don't flush here or the validation is bypassed, which can cause duplicate name icv, see #146
17621762
}
17631763
} else { # for imports where there is no event triggered, use the users current team
17641764
$team = $em->getRepository('Teams\Entity\Team')->findOneBy(['id' => $this->currentTeam()]);

0 commit comments

Comments
 (0)