Skip to content

Commit

Permalink
[kbss-cvut/termit-ui#449] Fix NPX in ExcelImport.
Browse files Browse the repository at this point in the history
  • Loading branch information
ledsoft committed Aug 13, 2024
1 parent c95ab19 commit 35e4134
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ public Vocabulary importVocabulary(ImportConfiguration config, ImportInput data)
terms = sheetImporter.resolveTermsFromSheet(sheet);
rawDataToInsert.addAll(sheetImporter.getRawDataToInsert());
}
terms.stream().filter(t -> termService.exists(t.getUri())).forEach(t -> {
terms.stream().filter(t -> t.getUri() != null && termService.exists(t.getUri())).forEach(t -> {
LOG.trace("Term {} already exists. Removing old version.", t);
termService.forceRemove(termService.findRequired(t.getUri()));
// Flush changes to prevent EntityExistsExceptions when term is already managed in PC as different type (Term vs TermInfo)
Expand Down

0 comments on commit 35e4134

Please sign in to comment.