aboutsummaryrefslogtreecommitdiffstats
path: root/rust/src
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2021-10-12 17:25:27 -0700
committerBryan Newbold <bnewbold@robocracy.org>2021-10-13 16:21:30 -0700
commit81e3fc2f60f80040d4d7b5f99191aa706f41c3c7 (patch)
tree7efeee93faaa1be6cf09d1944d87bd49d24bfe0a /rust/src
parent31c96eb15af54c90e4d048dfe82cc580a0679a13 (diff)
downloadfatcat-81e3fc2f60f80040d4d7b5f99191aa706f41c3c7.tar.gz
fatcat-81e3fc2f60f80040d4d7b5f99191aa706f41c3c7.zip
fatcat-api: enforce more release ext_id checks at create/update
Not enforcing these was a serious bug!
Diffstat (limited to 'rust/src')
-rw-r--r--rust/src/entity_crud.rs17
1 files 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)?;
}