mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-07 01:54:22 +00:00
Fix #8963: Remove deletion constraint from Groomer
This commit is contained in:
@@ -141,20 +141,10 @@ public class Groomer {
|
|||||||
System.out.println();
|
System.out.println();
|
||||||
|
|
||||||
if (delete) {
|
if (delete) {
|
||||||
List<String> whyNot = ePersonService.getDeleteConstraints(myContext, account);
|
try {
|
||||||
if (!whyNot.isEmpty()) {
|
ePersonService.delete(myContext, account);
|
||||||
System.out.print("\tCannot be deleted; referenced in");
|
} catch (AuthorizeException | IOException ex) {
|
||||||
for (String table : whyNot) {
|
System.err.println(ex.getMessage());
|
||||||
System.out.print(' ');
|
|
||||||
System.out.print(table);
|
|
||||||
}
|
|
||||||
System.out.println();
|
|
||||||
} else {
|
|
||||||
try {
|
|
||||||
ePersonService.delete(myContext, account);
|
|
||||||
} catch (AuthorizeException | IOException ex) {
|
|
||||||
System.err.println(ex.getMessage());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user