some cleaning
This commit is contained in:
parent
4d4ac5bbba
commit
b3d228e83b
@ -535,20 +535,6 @@ public class ImporterFacade {
|
||||
} else {
|
||||
logger.debug("Can't find supervisor: " + supervisorDTO.id);
|
||||
}
|
||||
// if (supervisor != null) {
|
||||
// List<Keyword> currentUnits = supervisor.getKeywords().getFiltered(keywordTypeDao.findByType(KeywordTypeDao.TYPE.UNIT));
|
||||
// //If supervisor is already assigned to a unit, remove to make sure only the latest unit is being added since we only allow one unit in Scipro.
|
||||
// //Supervisor is not going to be allowed to have more than one unit in the future, but some have two in Daisy at the moment.
|
||||
// if (!currentUnits.isEmpty()) {
|
||||
// logger.info(supervisor.getUser().getFullName() + " is already attached to a unit and this is being overwritten.");
|
||||
// supervisor.getKeywords().getAll().removeAll(currentUnits);
|
||||
// }
|
||||
// Keyword unitToAdd = keywordDao.getKeywordByIdentifierAndType(unitDTO.id, keywordTypeDao.findByType(KeywordTypeDao.TYPE.UNIT));
|
||||
// logger.debug("Adding unit: " + unitToAdd.getKeyword() + " to supervisor: " + supervisor.getUser().getFullName());
|
||||
// supervisor.getKeywords().getAll().add(unitToAdd);
|
||||
// } else {
|
||||
// logger.debug("Can't find supervisor: " + supervisorDTO.id);
|
||||
// }
|
||||
}
|
||||
|
||||
private void mergeLinkedResearchAreas(final User user, final Set<ResearchAreaDTO> areas) {
|
||||
@ -665,11 +651,6 @@ public class ImporterFacade {
|
||||
logger.debug(supervisor.getNameAsString() + " does not have a remote unit. Searching for local units to remove.");
|
||||
supervisor.setUnit(null);
|
||||
logger.debug("Removed units from: " + supervisor.getNameAsString());
|
||||
// List<Keyword> unitsToRemove = supervisor.getKeywords().getFiltered(keywordTypeDao.findByType(KeywordTypeDao.TYPE.UNIT));
|
||||
// if (!unitsToRemove.isEmpty()) {
|
||||
// supervisor.getKeywords().getAll().removeAll(unitsToRemove);
|
||||
// logger.debug("Removed units from: " + supervisor.getNameAsString());
|
||||
// }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user