diff options
author | Bryan Newbold <bnewbold@robocracy.org> | 2021-10-12 19:56:26 -0700 |
---|---|---|
committer | Bryan Newbold <bnewbold@robocracy.org> | 2021-10-13 16:21:30 -0700 |
commit | 54cb27a58b7753e141769fa3392a8b22e88897f4 (patch) | |
tree | 36885578648cca85d4f3cbc09a08828b29d59bdd /rust/src/entity_crud.rs | |
parent | 11fdff350e0549d46a8a7b5e74451e08ce067cb2 (diff) | |
download | fatcat-54cb27a58b7753e141769fa3392a8b22e88897f4.tar.gz fatcat-54cb27a58b7753e141769fa3392a8b22e88897f4.zip |
rust: prep for possible DOI lowercase enforcement
See also: https://github.com/internetarchive/fatcat/issues/83
This commit is no behavior change, just leaving a note to self.
Diffstat (limited to 'rust/src/entity_crud.rs')
-rw-r--r-- | rust/src/entity_crud.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/rust/src/entity_crud.rs b/rust/src/entity_crud.rs index cbf9592b..32b2fcef 100644 --- a/rust/src/entity_crud.rs +++ b/rust/src/entity_crud.rs @@ -2270,7 +2270,11 @@ impl EntityCrud for ReleaseEntity { withdrawn_status: model.withdrawn_status.clone(), withdrawn_date: model.withdrawn_date, withdrawn_year: model.withdrawn_year, - doi: model.ext_ids.doi.clone(), + doi: match model.ext_ids.doi.clone() { + None => None, + // NOTE: DOI lowercase is *not* currently being enforced here, but could be + Some(s) => Some(s), + }, pmid: model.ext_ids.pmid.clone(), pmcid: model.ext_ids.pmcid.clone(), wikidata_qid: model.ext_ids.wikidata_qid.clone(), |