Commit 17b21f88 authored by Matija Obreza's avatar Matija Obreza
Browse files

NPE fixed in BatchRESTService

parent 94c118d0
......@@ -597,7 +597,7 @@ public class BatchRESTServiceImpl implements BatchRESTService {
UpdateTargets targets = new UpdateTargets();
targets.addKwsItem(TermConstants.PASSPORT_DATA);
savedData.stream().map(a -> a.getDoi()).filter(doi -> doi != null).forEach(doi -> targets.addDoisItem(doi));
if (targets.getDois().size() > 0) {
if (targets.getDois() != null && targets.getDois().size() > 0) {
try {
LOG.debug("Updating GLIS for {} accessions with DOIs", targets.getDois().size());
List<UpdatedTarget> glisResponse = glisGenesysApi.registerGenesysAsTarget(targets);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment