mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-07 01:54:22 +00:00
[DS-1848] OAI harvest issues when starting from control panel/command line
This commit is contained in:
@@ -374,8 +374,12 @@ public class OAIHarvester {
|
||||
listRecords = new ListRecords(oaiSource, resumptionToken);
|
||||
}
|
||||
ourContext.turnOffAuthorisationSystem();
|
||||
try {
|
||||
targetCollection.update();
|
||||
} finally {
|
||||
//In case of an exception, make sure to restore our authentication state to the previous state
|
||||
ourContext.restoreAuthSystemState();
|
||||
}
|
||||
ourContext.commit();
|
||||
}
|
||||
}
|
||||
@@ -404,7 +408,6 @@ public class OAIHarvester {
|
||||
targetCollection.update();
|
||||
ourContext.commit();
|
||||
ourContext.restoreAuthSystemState();
|
||||
ourContext.restoreAuthSystemState();
|
||||
}
|
||||
|
||||
// If we got to this point, it means the harvest was completely successful
|
||||
|
Reference in New Issue
Block a user