]> Untitled Git - lemmy.git/commitdiff
Fixing post community filter. Fixes #1187
authorDessalines <tyhou13@gmx.com>
Fri, 9 Oct 2020 18:09:00 +0000 (13:09 -0500)
committerDessalines <tyhou13@gmx.com>
Fri, 9 Oct 2020 18:09:00 +0000 (13:09 -0500)
lemmy_db/src/post_view.rs

index ed7e4f3fa6359198eb3ae5a0bea58f87868117bb..15652477e2eae57673257d8fa6b81a8837022398 100644 (file)
@@ -289,9 +289,7 @@ impl<'a> PostQueryBuilder<'a> {
 
     if let Some(search_term) = self.search_term {
       let searcher = fuzzy_search(&search_term);
-      query = query
-        .filter(name.ilike(searcher.to_owned()))
-        .or_filter(body.ilike(searcher));
+      query = query.filter(name.ilike(searcher.to_owned()).or(body.ilike(searcher)));
     }
 
     query = match self.sort {