diff options
author | Bryan Newbold <bnewbold@robocracy.org> | 2018-06-19 19:31:42 -0700 |
---|---|---|
committer | Bryan Newbold <bnewbold@robocracy.org> | 2018-06-19 20:21:21 -0700 |
commit | 66cdee845f281986ca3fc33743aed2d90776a76d (patch) | |
tree | 629a68a7377522423b1ea04cc6c83331faa7fa51 /rust/src | |
parent | d8253db13c38e844c0d9d5580445675651879a2c (diff) | |
download | fatcat-66cdee845f281986ca3fc33743aed2d90776a76d.tar.gz fatcat-66cdee845f281986ca3fc33743aed2d90776a76d.zip |
consistent volume/issue/pages ordering
Diffstat (limited to 'rust/src')
-rw-r--r-- | rust/src/api_server.rs | 6 | ||||
-rw-r--r-- | rust/src/database_models.rs | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/rust/src/api_server.rs b/rust/src/api_server.rs index 97ee93d6..24c62625 100644 --- a/rust/src/api_server.rs +++ b/rust/src/api_server.rs @@ -271,8 +271,8 @@ fn release_row2entity( doi: rev.doi, isbn13: rev.isbn13, volume: rev.volume, - pages: rev.pages, issue: rev.issue, + pages: rev.pages, container_id: rev.container_ident_id.map(|u| u.to_string()), publisher: rev.publisher, language: rev.language, @@ -668,7 +668,7 @@ impl Server { }; let edit: ReleaseEditRow = diesel::sql_query( - "WITH rev AS ( INSERT INTO release_rev (title, release_type, release_status, release_date, doi, isbn13, volume, pages, issue, work_ident_id, container_ident_id, publisher, language, extra_json) + "WITH rev AS ( INSERT INTO release_rev (title, release_type, release_status, release_date, doi, isbn13, volume, issue, pages, work_ident_id, container_ident_id, publisher, language, extra_json) VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14) RETURNING id ), ident AS ( INSERT INTO release_ident (rev_id) @@ -685,8 +685,8 @@ impl Server { .bind::<diesel::sql_types::Nullable<diesel::sql_types::Text>, _>(entity.doi) .bind::<diesel::sql_types::Nullable<diesel::sql_types::Text>, _>(entity.isbn13) .bind::<diesel::sql_types::Nullable<diesel::sql_types::Text>, _>(entity.volume) - .bind::<diesel::sql_types::Nullable<diesel::sql_types::Text>, _>(entity.pages) .bind::<diesel::sql_types::Nullable<diesel::sql_types::Text>, _>(entity.issue) + .bind::<diesel::sql_types::Nullable<diesel::sql_types::Text>, _>(entity.pages) .bind::<diesel::sql_types::Uuid, _>(work_id) .bind::<diesel::sql_types::Nullable<diesel::sql_types::Uuid>, _>(container_id) .bind::<diesel::sql_types::Nullable<diesel::sql_types::Text>, _>(entity.publisher) diff --git a/rust/src/database_models.rs b/rust/src/database_models.rs index 2d72795e..dd84748d 100644 --- a/rust/src/database_models.rs +++ b/rust/src/database_models.rs @@ -153,8 +153,8 @@ pub struct ReleaseRevRow { pub doi: Option<String>, pub isbn13: Option<String>, pub volume: Option<String>, - pub pages: Option<String>, pub issue: Option<String>, + pub pages: Option<String>, pub publisher: Option<String>, pub language: Option<String>, } |