diff options
author | Galen Guyer <galen@galenguyer.com> | 2023-01-23 20:12:30 -0500 |
---|---|---|
committer | Galen Guyer <galen@galenguyer.com> | 2023-01-23 20:12:30 -0500 |
commit | 421854a1399a6adb3753cdbb012a559311eb5f02 (patch) | |
tree | 1e452d2d2d6baec4bc5d2ba214ebbb83b9952ce9 | |
parent | 0d472eb87cd206a2511a047f3606ca6b3e62c666 (diff) |
ignore null frn
-rw-r--r-- | src/bin/api.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/bin/api.rs b/src/bin/api.rs index 80a46e8..182dbaa 100644 --- a/src/bin/api.rs +++ b/src/bin/api.rs @@ -148,14 +148,15 @@ async fn query_search( JOIN headers ON amateurs.unique_system_identifier = headers.unique_system_identifier WHERE - entities.frn IN ( - SELECT frn + entities.unique_system_identifier IN ( + SELECT unique_system_identifier FROM entities WHERE (?1 IS NULL OR call_sign LIKE ?1) AND (?2 IS NULL OR first_name LIKE ?2) AND (?3 IS NULL OR last_name LIKE ?3) ) + AND frn != '' GROUP BY entities.frn ORDER BY headers.grant_date DESC LIMIT ?4"#; |