Project

General

Profile

« Previous | Next » 

Revision 7400

do not allow updates to orphan another branch of revision history. https://redmine.dataone.org/issues/3338

View differences:

src/edu/ucsb/nceas/metacat/dataone/MNodeService.java
272 272
            // get the existing system metadata for the object
273 273
            SystemMetadata existingSysMeta = getSystemMetadata(session, pid);
274 274

  
275
            // check for previous update
276
            // see: https://redmine.dataone.org/issues/3336
277
            Identifier existingObsoletedBy = existingSysMeta.getObsoletedBy();
278
            if (existingObsoletedBy != null) {
279
            	throw new InvalidRequest("1202", 
280
            			"The previous identifier has already been made obsolete by: " + existingObsoletedBy.getValue());
281
            }
282
            
275 283
            // add the newPid to the obsoletedBy list for the existing sysmeta
276 284
            existingSysMeta.setObsoletedBy(newPid);
277 285

  

Also available in: Unified diff