Rename add to toAdd
This commit is contained in:
parent
09cf81d4f3
commit
2858446668
@ -241,12 +241,12 @@ public class ProjectExporter extends AbstractWorker {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void updateHeadSupervisor(Project project) throws ExternalExportException {
|
private void updateHeadSupervisor(Project project) throws ExternalExportException {
|
||||||
boolean add = true;
|
boolean toAdd = true;
|
||||||
Set<ProjectParticipant> contributors = daisyAPI.getContributors(project.getIdentifier());
|
Set<ProjectParticipant> contributors = daisyAPI.getContributors(project.getIdentifier());
|
||||||
for (ProjectParticipant contributor : contributors) {
|
for (ProjectParticipant contributor : contributors) {
|
||||||
if (contributor.getRole() == Role.SUPERVISOR) {
|
if (contributor.getRole() == Role.SUPERVISOR) {
|
||||||
if (contributor.getPerson().getId().equals(project.getHeadSupervisor().getIdentifier())) {
|
if (contributor.getPerson().getId().equals(project.getHeadSupervisor().getIdentifier())) {
|
||||||
add = false;
|
toAdd = false;
|
||||||
} else {
|
} else {
|
||||||
Response response = daisyAPI.deleteThesisPerson(project.getIdentifier(), contributor.getPerson().getId());
|
Response response = daisyAPI.deleteThesisPerson(project.getIdentifier(), contributor.getPerson().getId());
|
||||||
if (response.getStatusInfo().getFamily() != Response.Status.Family.SUCCESSFUL) {
|
if (response.getStatusInfo().getFamily() != Response.Status.Family.SUCCESSFUL) {
|
||||||
@ -260,12 +260,12 @@ public class ProjectExporter extends AbstractWorker {
|
|||||||
// the project from having multiple supervisors.
|
// the project from having multiple supervisors.
|
||||||
// Hopefully Daisy API will soon have support for the function "change supervisor"
|
// Hopefully Daisy API will soon have support for the function "change supervisor"
|
||||||
// rather than just INSERT and DELETE rows in a table.
|
// rather than just INSERT and DELETE rows in a table.
|
||||||
add = false;
|
toAdd = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (add) {
|
if (toAdd) {
|
||||||
externalExporter.addContributorToProject(project, project.getHeadSupervisor(), Role.SUPERVISOR);
|
externalExporter.addContributorToProject(project, project.getHeadSupervisor(), Role.SUPERVISOR);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user