From 474f06354248017406f252c574ca38b679af6c23 Mon Sep 17 00:00:00 2001 From: Bat Date: Mon, 23 Apr 2018 12:28:03 +0100 Subject: [PATCH] Add relation between blog and authors --- src/models/blog_authors.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/models/blog_authors.rs b/src/models/blog_authors.rs index 8a0e73e6..440bed91 100644 --- a/src/models/blog_authors.rs +++ b/src/models/blog_authors.rs @@ -23,14 +23,14 @@ impl BlogAuthor { diesel::insert_into(blog_authors::table) .values(new) .get_result(conn) - .expect("Error saving new blog") + .expect("Error saving new blog author") } pub fn get(conn: &PgConnection, id: i32) -> Option { blog_authors::table.filter(blog_authors::id.eq(id)) .limit(1) .load::(conn) - .expect("Error loading blog by id") + .expect("Error loading blog author by id") .into_iter().nth(0) } }