From 81e3fc2f60f80040d4d7b5f99191aa706f41c3c7 Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Tue, 12 Oct 2021 17:25:27 -0700 Subject: fatcat-api: enforce more release ext_id checks at create/update Not enforcing these was a serious bug! --- rust/src/entity_crud.rs | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/rust/src/entity_crud.rs b/rust/src/entity_crud.rs index 0d72788d..b3b97c73 100644 --- a/rust/src/entity_crud.rs +++ b/rust/src/entity_crud.rs @@ -2107,15 +2107,28 @@ impl EntityCrud for ReleaseEntity { if let Some(ref extid) = entity.ext_ids.core { check_core_id(extid)?; } + if let Some(ref extid) = entity.ext_ids.arxiv { + check_arxiv_id(extid)?; + } if let Some(ref extid) = entity.ext_ids.jstor { check_jstor_id(extid)?; } + if let Some(ref extid) = entity.ext_ids.ark { + check_ark_id(extid)?; + } if let Some(ref extid) = entity.ext_ids.mag { check_mag_id(extid)?; } - if let Some(ref extid) = entity.ext_ids.ark { - check_ark_id(extid)?; + if let Some(ref extid) = entity.ext_ids.doaj { + check_doaj_id(extid)?; + } + if let Some(ref extid) = entity.ext_ids.dblp { + check_dblp_key(extid)?; } + if let Some(ref extid) = entity.ext_ids.oai { + check_oai_id(extid)?; + } + if let Some(ref release_type) = entity.release_type { check_release_type(release_type)?; } -- cgit v1.2.3