We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f0733d5 commit ef33d9cCopy full SHA for ef33d9c
src/category.rs
@@ -147,7 +147,8 @@ impl Category {
147
pub fn subcategories(&self, conn: &GenericConnection)
148
-> CargoResult<Vec<Category>> {
149
let stmt = try!(conn.prepare("SELECT * FROM categories \
150
- WHERE category ILIKE $1 || '::%'"));
+ WHERE category ILIKE $1 || '::%'
151
+ AND category NOT ILIKE $1 || '::%::%'"));
152
let rows = try!(stmt.query(&[&self.category]));
153
Ok(rows.iter().map(|r| Model::from_row(&r)).collect())
154
}
0 commit comments