From 51b1523cfb77b0bba02322a1147597f582a3d60d Mon Sep 17 00:00:00 2001 From: Bulat Kurbanov Date: Fri, 11 Aug 2023 23:41:11 +0200 Subject: [PATCH] Fix --- src/views/authors.rs | 5 ++++- src/views/sequences.rs | 3 +++ src/views/translators.rs | 3 +++ 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/views/authors.rs b/src/views/authors.rs index 64e8770..ca01a4e 100644 --- a/src/views/authors.rs +++ b/src/views/authors.rs @@ -148,7 +148,7 @@ async fn get_author_books( let author = db .author() .find_unique( - author::id::equals(author_id) + author::id::equals(author_id), ) .with( author::author_annotation::fetch() @@ -165,6 +165,7 @@ async fn get_author_books( let books_count = db .book() .count(vec![ + book::is_deleted::equals(false), book::book_authors::some(vec![ book_author::author_id::equals(author_id) ]), @@ -177,6 +178,7 @@ async fn get_author_books( let books = db .book() .find_many(vec![ + book::is_deleted::equals(false), book::book_authors::some(vec![ book_author::author_id::equals(author_id) ]), @@ -229,6 +231,7 @@ async fn get_author_books_available_types( let books = db .book() .find_many(vec![ + book::is_deleted::equals(false), book::book_authors::some(vec![ book_author::author_id::equals(author_id) ]), diff --git a/src/views/sequences.rs b/src/views/sequences.rs index 4673604..f9c47de 100644 --- a/src/views/sequences.rs +++ b/src/views/sequences.rs @@ -137,6 +137,7 @@ async fn get_sequence_available_types( let books = db .book() .find_many(vec![ + book::is_deleted::equals(false), book::book_sequences::some(vec![ book_sequence::sequence_id::equals(sequence_id) ]), @@ -184,6 +185,7 @@ async fn get_sequence_books( let books_count = db .book() .count(vec![ + book::is_deleted::equals(false), book::book_sequences::some(vec![ book_sequence::sequence_id::equals(sequence_id) ]), @@ -196,6 +198,7 @@ async fn get_sequence_books( let books = db .book() .find_many(vec![ + book::is_deleted::equals(false), book::book_sequences::some(vec![ book_sequence::sequence_id::equals(sequence_id) ]), diff --git a/src/views/translators.rs b/src/views/translators.rs index 4ba093e..8cb952a 100644 --- a/src/views/translators.rs +++ b/src/views/translators.rs @@ -33,6 +33,7 @@ async fn get_translated_books( let books_count = db .book() .count(vec![ + book::is_deleted::equals(false), book::translations::some(vec![ translator::author_id::equals(translator_id) ]), @@ -45,6 +46,7 @@ async fn get_translated_books( let books = db .book() .find_many(vec![ + book::is_deleted::equals(false), book::translations::some(vec![ translator::author_id::equals(translator_id) ]), @@ -97,6 +99,7 @@ async fn get_translated_books_available_types( let books = db .book() .find_many(vec![ + book::is_deleted::equals(false), book::translations::some(vec![ translator::author_id::equals(translator_id) ]),