Pull request #192: RED-1830
Merge in RED/redaction-service from RED-1830 to master * commit 'd4486ea6f4d31d68a2c75ec5e192f2a3bd62443c': fixed PMD fixed undo after reanalysis
This commit is contained in:
commit
26def889d8
@ -667,16 +667,21 @@ public class RedactionLogCreatorService {
|
||||
// Cannot undo Already Approved change because UI won't allow it for now
|
||||
if (Status.REQUESTED.equals(entry.getStatus())) {
|
||||
if (entry.getManualRedactionType() == ManualRedactionType.RECATEGORIZE) {
|
||||
entry.setManual(false);
|
||||
entry.setStatus(null);
|
||||
entry.setRecategorizationType(null);
|
||||
var recategorizeExists = manualRedactions.getImageRecategorizations().stream().anyMatch(entryToAdd -> entryToAdd.getId().equalsIgnoreCase(entry.getId()));
|
||||
if (!recategorizeExists) {
|
||||
entry.setManual(false);
|
||||
entry.setStatus(null);
|
||||
entry.setRecategorizationType(null);
|
||||
}
|
||||
}
|
||||
if (entry.getManualRedactionType() == ManualRedactionType.LEGAL_BASIS_CHANGE) {
|
||||
entry.setManual(false);
|
||||
entry.setStatus(null);
|
||||
entry.setLegalBasisChangeValue(null);
|
||||
var legalBasisChangeExists = manualRedactions.getImageRecategorizations().stream().anyMatch(entryToAdd -> entryToAdd.getId().equalsIgnoreCase(entry.getId()));
|
||||
if (!legalBasisChangeExists) {
|
||||
entry.setManual(false);
|
||||
entry.setStatus(null);
|
||||
entry.setLegalBasisChangeValue(null);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user