This commit is contained in:
Timo 2021-01-08 11:34:38 +02:00
parent 959bde335c
commit 6993f4fcce

View File

@ -55,8 +55,9 @@ export class FileDataModel {
});
this.manualRedactions.entriesToAdd.forEach((manual) => {
let wrapper;
if (this._hasAlreadyBeenProcessed(manual) && this._isAcceptedOrRejected(manual)) {
let wrapper = result.find((r) => r.id === manual.id);
wrapper = result.find((r) => r.id === manual.id);
if (wrapper) {
wrapper.userId = manual.user;
} else {
@ -70,7 +71,7 @@ export class FileDataModel {
}
// normal case
let wrapper = result.find((r) => r.id === manual.id);
wrapper = result.find((r) => r.id === manual.id);
if (!wrapper) {
// false positive and recommendation case
// if we mark Annotation N as false positive -> it's reason is the original annotations Id
@ -115,8 +116,9 @@ export class FileDataModel {
});
this.manualRedactions.idsToRemove.forEach((idToRemove) => {
let wrapper;
if (this._hasAlreadyBeenProcessed(idToRemove) && this._isAcceptedOrRejected(idToRemove)) {
const wrapper = result.find((r) => r.id === idToRemove.id);
wrapper = result.find((r) => r.id === idToRemove.id);
if (wrapper && wrapper.dictionaryEntry) {
wrapper.manual = false;
wrapper.manualRedactionType = null;
@ -125,7 +127,7 @@ export class FileDataModel {
return;
}
const wrapper = result.find((r) => r.id === idToRemove.id);
wrapper = result.find((r) => r.id === idToRemove.id);
if (wrapper) {
wrapper.manual = true;
wrapper.dictionaryEntry = idToRemove.removeFromDictionary;