Pull request #163: flag calculations critical fix

Merge in RED/persistence-service from flag-calculation to master

* commit 'f9f94389b7ce33e5213ee3c476bd3ee7837dfe65':
  flag calculations critical fix
This commit is contained in:
Timo Bejan 2021-12-20 16:10:06 +01:00
commit c9918e9d4e

View File

@ -83,10 +83,20 @@ public class AnalysisFlagsCalculationService {
}
fileStatusPersistenceService.updateFlags(fileId, hasRedactions, hasHints, hasImages, hasSuggestions, hasComments, hasUpdates);
log.info("Flag Calculations for file: {} took: {}ms", fileId, System.currentTimeMillis() - startTime);
if (file.isHasRedactions() == hasRedactions &&
file.isHasHints() == hasHints &&
file.isHasImages() == hasImages &&
file.isHasSuggestions() == hasSuggestions &&
file.isHasAnnotationComments() == hasComments &&
file.isHasUpdates() == hasUpdates) {
log.info("Nothing Changed for file: {}", fileId);
} else {
fileStatusPersistenceService.updateFlags(fileId, hasRedactions, hasHints, hasImages, hasSuggestions, hasComments, hasUpdates);
}
}