From ea9baf30518a713b988c239e97300453cd206355 Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Mon, 13 May 2019 14:11:29 -0700 Subject: rust: fix creator field order mangling It's sort of disturbing that this sort of typo/bug can have an actual runtime impact. (struct field order must match schema order) --- rust/src/database_models.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'rust/src') diff --git a/rust/src/database_models.rs b/rust/src/database_models.rs index 60d6922c..1b0c2de3 100644 --- a/rust/src/database_models.rs +++ b/rust/src/database_models.rs @@ -161,10 +161,10 @@ pub struct CreatorRevRow { pub id: Uuid, pub extra_json: Option, pub display_name: String, - pub orcid: Option, - pub wikidata_qid: Option, pub given_name: Option, pub surname: Option, + pub orcid: Option, + pub wikidata_qid: Option, } #[derive(Debug, Associations, AsChangeset, Insertable)] @@ -172,10 +172,10 @@ pub struct CreatorRevRow { pub struct CreatorRevNewRow { pub extra_json: Option, pub display_name: String, - pub orcid: Option, - pub wikidata_qid: Option, pub given_name: Option, pub surname: Option, + pub orcid: Option, + pub wikidata_qid: Option, } entity_structs!( -- cgit v1.2.3