Skip to content

Commit

Permalink
Fix NonUniqueObjectException
Browse files Browse the repository at this point in the history
  • Loading branch information
matthias-ronge committed Dec 10, 2024
1 parent e76f6e0 commit b6fb9ba
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions Kitodo/src/test/java/org/kitodo/MockDatabase.java
Original file line number Diff line number Diff line change
Expand Up @@ -1200,7 +1200,6 @@ private static void insertTasks() throws Exception {
task.setProcessingUser(secondUser);
secondUser.getProcessingTasks().add(task);
}
ServiceManager.getTaskService().save(task);
firstProcess.getTasks().add(task);
}

Expand All @@ -1226,7 +1225,6 @@ private static void insertTasks() throws Exception {
eleventhTask.setScriptPath("../type/automatic/script/path");
eleventhTask.getRoles().add(role);
role.getTasks().add(eleventhTask);
ServiceManager.getTaskService().save(eleventhTask);
firstUser.getProcessingTasks().add(eleventhTask);
secondProcess.getTasks().add(eleventhTask);

Expand All @@ -1241,7 +1239,6 @@ private static void insertTasks() throws Exception {
twelfthTask.setProcess(secondProcess);
twelfthTask.getRoles().add(role);
role.getTasks().add(twelfthTask);
ServiceManager.getTaskService().save(twelfthTask);
firstUser.getProcessingTasks().add(twelfthTask);
ServiceManager.getUserService().save(firstUser);
secondProcess.getTasks().add(twelfthTask);
Expand All @@ -1256,7 +1253,6 @@ private static void insertTasks() throws Exception {
thirteenTask.setProcess(secondProcess);
thirteenTask.getRoles().add(role);
role.getTasks().add(thirteenTask);
ServiceManager.getTaskService().save(thirteenTask);
secondProcess.getTasks().add(thirteenTask);

ServiceManager.getRoleService().save(role);
Expand Down

0 comments on commit b6fb9ba

Please sign in to comment.