summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2021-10-12 19:56:26 -0700
committerBryan Newbold <bnewbold@robocracy.org>2021-10-13 16:21:30 -0700
commit54cb27a58b7753e141769fa3392a8b22e88897f4 (patch)
tree36885578648cca85d4f3cbc09a08828b29d59bdd
parent11fdff350e0549d46a8a7b5e74451e08ce067cb2 (diff)
downloadfatcat-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.
-rw-r--r--rust/src/entity_crud.rs6
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(),