chore: bit of cleanup
This commit is contained in:
parent
bf100049b1
commit
32e27978ec
5 changed files with 7 additions and 26 deletions
|
|
@ -9,7 +9,10 @@ pub struct Filter {
|
|||
|
||||
impl IntoCondition for Filter {
|
||||
fn into_condition(self) -> Condition {
|
||||
Condition::all().add_option(self.name.map(|name| package::Column::Name.like(name)))
|
||||
Condition::all().add_option(
|
||||
self.name
|
||||
.map(|name| repo::Column::Name.like(format!("%{}%", name))),
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue