Fix #8963: Remove deletion constraint from Groomer

This commit is contained in:
Martin Walk
2023-08-03 13:39:43 +02:00
parent eb7cdb1d21
commit e07763b021

View File

@@ -141,20 +141,10 @@ public class Groomer {
System.out.println();
if (delete) {
List<String> whyNot = ePersonService.getDeleteConstraints(myContext, account);
if (!whyNot.isEmpty()) {
System.out.print("\tCannot be deleted; referenced in");
for (String table : whyNot) {
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());
}
try {
ePersonService.delete(myContext, account);
} catch (AuthorizeException | IOException ex) {
System.err.println(ex.getMessage());
}
}
}