Skip to content

Commit

Permalink
Merge pull request #1319 from libris/feature/lxl-4209-non-deletion-bl…
Browse files Browse the repository at this point in the history
…ocking-relations

Check exclude list also when actually about to remove doc
  • Loading branch information
kwahlin authored Oct 23, 2023
2 parents f4b9c79 + 5c197d4 commit 998dd78
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2585,7 +2585,7 @@ class PostgreSQLComponent {

void remove(String identifier, String changedIn, String changedBy, boolean force=false) {
if (versioning) {
if(!force && !followDependers(identifier).isEmpty())
if(!force && !followDependers(identifier, JsonLd.ALLOW_LINK_TO_DELETED).isEmpty())
throw new RuntimeException("Deleting depended upon records is not allowed.")

log.debug("Marking document with ID ${identifier} as deleted.")
Expand Down

0 comments on commit 998dd78

Please sign in to comment.