fixed orientation duplicates check
This commit is contained in:
parent
b60d5ebf61
commit
a4de86b5df
1 changed files with 7 additions and 6 deletions
|
@ -70,18 +70,19 @@ public class OrientationTableDuplicatesCheck implements DBIntegrityCheck {
|
||||||
return "OK";
|
return "OK";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
final List<Long> checkedToDelete = toDelete
|
||||||
|
.stream()
|
||||||
|
.filter(this::doubleCheck)
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
|
||||||
if (tryFix) {
|
if (tryFix) {
|
||||||
final List<Long> checkedToDelete = toDelete
|
|
||||||
.stream()
|
|
||||||
.filter(this::doubleCheck)
|
|
||||||
.collect(Collectors.toList());
|
|
||||||
|
|
||||||
checkedToDelete
|
checkedToDelete
|
||||||
.stream()
|
.stream()
|
||||||
.forEach(this.orientationRecordMapper::deleteByPrimaryKey);
|
.forEach(this.orientationRecordMapper::deleteByPrimaryKey);
|
||||||
return "Fixed duplicates by deletion: " + checkedToDelete + " from findings:" + toDelete;
|
return "Fixed duplicates by deletion: " + checkedToDelete;
|
||||||
} else {
|
} else {
|
||||||
return "Found duplicates: " + toDelete;
|
return "Found duplicates: " + checkedToDelete;
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue