Search: if both active and archived are turned off, return nothing
This commit is contained in:
parent
22bff52921
commit
7ba325bcee
1 changed files with 8 additions and 0 deletions
|
|
@ -136,6 +136,14 @@ func PeopleSearch(params PeopleSearchParams) (PeopleSearchResults, error) {
|
||||||
`, sqlFilters)
|
`, sqlFilters)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Filter: if both active and archived are turned off, return nothing
|
||||||
|
if !params.Archive && !params.Active {
|
||||||
|
sqlFilters = fmt.Sprintf(`--sql
|
||||||
|
%s
|
||||||
|
AND 0=1
|
||||||
|
`, sqlFilters)
|
||||||
|
}
|
||||||
|
|
||||||
// Filters: email
|
// Filters: email
|
||||||
if len(params.Email) > 0 {
|
if len(params.Email) > 0 {
|
||||||
sqlFilters = fmt.Sprintf(`--sql
|
sqlFilters = fmt.Sprintf(`--sql
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue