File tree Expand file tree Collapse file tree
src/hermes/commands/deposit Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -327,11 +327,11 @@ def prepare(self) -> None:
327327 tmp_rec_id , tmp_rec_meta = self .resolver .resolve_latest_id (
328328 record_id = conf_rec_id , doi = conf_doi , codemeta_identifier = codemeta_identifier
329329 )
330- if tmp_rec_id is not None or tmp_rec_meta != {}:
331- if rec_id != tmp_rec_id or rec_meta != tmp_rec_meta :
332- # FIXME: Maybe finding different record ids is not fatal?
333- raise HermesValidationError ("Found two different record ids or conflicting metadata." )
330+ if rec_id is None and rec_meta == {}:
334331 rec_id , rec_meta = tmp_rec_id , tmp_rec_meta
332+ elif (tmp_rec_id is not None or tmp_rec_meta != {}) and (rec_id != tmp_rec_id or rec_meta != tmp_rec_meta ):
333+ # FIXME: Maybe finding different record ids is not fatal?
334+ raise HermesValidationError ("Found two different record ids or conflicting metadata." )
335335
336336 if len (self .metadata .get ("version" , [])) > 1 :
337337 raise HermesValidationError ("Too many licenses for invenio deposit." )
You can’t perform that action at this time.
0 commit comments