Apply minor file transformer fixes

This commit is contained in:
George Kalampokis 2024-02-06 09:40:28 +02:00
parent 02a1437a91
commit 3ac4ed1237
2 changed files with 4 additions and 5 deletions

View File

@ -229,7 +229,9 @@ public class DescriptionTemplateDefinitionFileTransformerBuilder extends BaseFil
m.setMethod(d.getMethod());
m.setHasAuth(d.getHasAuth());
m.setOptionsRoot(d.getOptionsRoot());
if (d.getAuth() != null) {
m.setAuth(convertAuthData(d.getAuth()));
}
m.setSourceBinding(convertComboBoxOption(d.getSourceBinding()));
result.add(m);
}

View File

@ -111,7 +111,6 @@ public class FileTransformerService {
List<TransformerRepository> repositories = transformerProperties.getSources().stream().map(depositSource -> getRepository(depositSource.getCodes().get(0))).toList();
repositories = new ArrayList<>(repositories);
List<TransformerRepository> toDelete = new ArrayList<>();
repositories.forEach((client) -> {
try {
FileTransformerConfiguration repositoryConfigs = client.getConfiguration();
@ -119,12 +118,10 @@ public class FileTransformerService {
configurations.addAll(repositoryConfigs.getExportVariants());
}
} catch (Exception e) {
toDelete.add(client);
logger.warn(e.getLocalizedMessage(), e);
}
});
repositories.removeAll(toDelete);
configs = new TransformerCacheModel(configurations);
this.fileTransformerConfigurationCache.put("base", configs);
}