Project

General

Profile

« Previous | Next » 

Revision 9383

Added by Jing Tao about 9 years ago

Doesn't allow to reset the archived field to be false if the field is true in the updateSystemMetadata method.

View differences:

src/edu/ucsb/nceas/metacat/dataone/D1NodeService.java
1811 1811
              } catch (NotFound e) {
1812 1812
                  throw new InvalidRequest("4869", "Can't find the pid "+pid.getValue()+" for archive.");
1813 1813
              }
1814
          } else if((currentSysmeta.getArchived() != null && currentSysmeta.getArchived() == true) && (sysmeta.getArchived() == null || sysmeta.getArchived() == false)) {
1815
              throw new InvalidRequest("4869", "The pid "+pid.getValue()+" has been archived and it can't be set archive false again.");
1814 1816
          } else {
1815 1817
              logMetacat.debug("D1Node.update - this is to archive a MN object "+pid.getValue());
1816 1818
              try {

Also available in: Unified diff