mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-07 01:54:22 +00:00
Improvements to changes in PR#364. Ensure withdrawn items are still exported to CSV. Improve error logging on export.
This commit is contained in:
@@ -385,8 +385,9 @@ public class DSpaceCSV implements Serializable
|
||||
*/
|
||||
public final void addItem(Item i) throws Exception
|
||||
{
|
||||
// If the item is not in the archive, the call to get its handle below will fail
|
||||
if (i.isWithdrawn() || !i.isArchived() || i.getOwningCollection() == null) {
|
||||
// If the item does not have an "owningCollection" the the below "getHandle()" call will fail
|
||||
// This should not happen but is here for safety.
|
||||
if (i.getOwningCollection() == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@@ -137,6 +137,9 @@ public class MetadataExport
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
// Something went wrong...
|
||||
System.err.println("Error exporting to CSV:");
|
||||
e.printStackTrace();
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -263,4 +266,4 @@ public class MetadataExport
|
||||
c.restoreAuthSystemState();
|
||||
c.complete();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user