From 66cdee845f281986ca3fc33743aed2d90776a76d Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Tue, 19 Jun 2018 19:31:42 -0700 Subject: consistent volume/issue/pages ordering --- rust/src/api_server.rs | 6 +++--- rust/src/database_models.rs | 2 +- rust/tests/test_api_server.rs | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) (limited to 'rust') 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::, _>(entity.doi) .bind::, _>(entity.isbn13) .bind::, _>(entity.volume) - .bind::, _>(entity.pages) .bind::, _>(entity.issue) + .bind::, _>(entity.pages) .bind::(work_id) .bind::, _>(container_id) .bind::, _>(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, pub isbn13: Option, pub volume: Option, - pub pages: Option, pub issue: Option, + pub pages: Option, pub publisher: Option, pub language: Option, } diff --git a/rust/tests/test_api_server.rs b/rust/tests/test_api_server.rs index b8f8b3c4..86863f0b 100644 --- a/rust/tests/test_api_server.rs +++ b/rust/tests/test_api_server.rs @@ -295,8 +295,8 @@ fn test_post_release() { "release_type": "journal-article", "doi": "10.1234/abcde.781231231239", "volume": "439", - "pages": "1-399", "issue": "IV", + "pages": "1-399", "work_id": "00000000-0000-0000-5555-000000000002", "container_id": "00000000-0000-0000-1111-000000000001", "refs": [{ -- cgit v1.2.3