Project

General

Profile

« Previous | Next » 

Revision 53886

raise error if Zenodo community (zenodoid) is null or empty in Post of new ZC associated to this RCD

View differences:

modules/dnet-openaire-exporter/trunk/src/main/java/eu/dnetlib/openaire/community/CommunityApiCore.java
191 191
		if (!StringUtils.equalsIgnoreCase(id, zc.getCommunityId())) {
192 192
			throw new CommunityException("parameters 'id' and zc.communityId must be coherent");
193 193
		}
194

  
194
        if(!StringUtils.isNotBlank(zc.getZenodoid())){
195
            throw new CommunityException("parameter zenodoid cannot be null or empty");
196
        }
195 197
		final TreeMap<Integer, CommunityZenodoCommunity> zcs = getZenodoCommunityMap(id);
196 198
		zc.setId(nextId(MapUtils.isNotEmpty(zcs) ? zcs.lastKey() : 0));
197 199

  

Also available in: Unified diff