From 54cb27a58b7753e141769fa3392a8b22e88897f4 Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Tue, 12 Oct 2021 19:56:26 -0700 Subject: 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. --- rust/src/entity_crud.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'rust') 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(), -- cgit v1.2.3