Pull request #172: RED-1539: Fixed missing textBefore & textAfter on reanalyis that leads to wrong changelog

Merge in RED/redaction-service from RED-1539 to master

* commit '143877ff2d6003597cd2a8fc0fe8f835f9d96de5':
  RED-1539: Fixed missing textBefore & textAfter on reanalyis that leads to wrong changelog
This commit is contained in:
Dominique Eiflaender 2021-06-16 11:20:40 +02:00
commit 3a4b8833c8

View File

@ -172,7 +172,7 @@ public class ReanalyzeService {
Set<Entity> entities = entityRedactionService.findEntities(reanalysisSection.getSearchableText(), reanalysisSection
.getHeadline(), reanalysisSection.getSectionNumber(), dictionary, false);
if (reanalysisSection.getCellStarts() != null) {
if (reanalysisSection.getCellStarts() != null && !reanalysisSection.getCellStarts().isEmpty()) {
surroundingWordsService.addSurroundingText(entities, reanalysisSection.getSearchableText(), dictionary, reanalysisSection
.getCellStarts());
} else {