Skip to content

Commit

Permalink
[kbss-cvut/termit-ui#581] Fix EntityExistsExceptions being thrown whe…
Browse files Browse the repository at this point in the history
…n importing translations to more complex vocabularies.
  • Loading branch information
ledsoft committed Dec 2, 2024
1 parent 28e6b95 commit 085507b
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,8 @@ public Vocabulary importTermTranslations(@Nonnull URI vocabularyIri, @Nonnull Im
}
mergeTranslations(t, existingTerm.get());
termService.update(existingTerm.get());
// Flush changes to prevent EntityExistsExceptions when term is already managed in PC as different type (Term vs TermInfo)
em.flush();
});
} catch (IOException e) {
throw new VocabularyImportException("Unable to read input as Excel.", e);
Expand Down

0 comments on commit 085507b

Please sign in to comment.