Skip to content

Commit

Permalink
Run post cleanup on fetched entry
Browse files Browse the repository at this point in the history
  • Loading branch information
Siedlerchr committed Apr 28, 2021
1 parent 65e4647 commit 2e2b0ad
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,10 @@ public void fetchAndMerge(BibEntry entry, List<Field> fields) {
if (fetcher.isPresent()) {
BackgroundTask.wrap(() -> fetcher.get().performSearchById(fieldContent.get()))
.onSuccess(fetchedEntry -> {
ImportCleanup cleanup = new ImportCleanup(libraryTab.getBibDatabaseContext().getMode());
cleanup.doPostCleanup(entry);
String type = field.getDisplayName();
if (fetchedEntry.isPresent()) {
ImportCleanup cleanup = new ImportCleanup(libraryTab.getBibDatabaseContext().getMode());
cleanup.doPostCleanup(fetchedEntry.get());
showMergeDialog(entry, fetchedEntry.get(), fetcher.get());
} else {
dialogService.notify(Localization.lang("Cannot get info based on given %0: %1", type, fieldContent.get()));
Expand Down

0 comments on commit 2e2b0ad

Please sign in to comment.