core
: Fix type mismatch
This commit is contained in:
parent
5078b41499
commit
219880f3d3
1 changed files with 2 additions and 2 deletions
|
@ -72,13 +72,13 @@ pub struct MetaProperty {
|
|||
}
|
||||
|
||||
impl MetaSubject {
|
||||
pub async fn query_matching(conn: &mut AsyncPgConnection, doc: &str, subject: &str) -> QueryResult<Vec<Self>> {
|
||||
pub async fn query_matching(conn: &mut AsyncPgConnection, doc: &str, subject_: &str) -> QueryResult<Vec<Self>> {
|
||||
use diesel::prelude::*;
|
||||
use diesel_async::RunQueryDsl;
|
||||
use schema::meta_subjects::dsl::*;
|
||||
|
||||
let document_is_equal = document.eq(doc);
|
||||
let subject_matches_pattern = subject.into_sql::<diesel::sql_types::Text>().ilike(pattern);
|
||||
let subject_matches_pattern = subject_.into_sql::<diesel::sql_types::Text>().ilike(pattern);
|
||||
|
||||
meta_subjects
|
||||
.filter(document_is_equal)
|
||||
|
|
Loading…
Reference in a new issue