fix: id based sqlite query

Queries using the `id` field were failing after the refactor of
removing hexranges.
This commit is contained in:
Daniel Cadenas 2024-07-29 12:01:12 -03:00 committed by Greg Heartsfield
parent 5ad318e6e8
commit af6d101c21

View File

@ -1016,7 +1016,8 @@ fn query_from_filter(f: &ReqFilter) -> (String, Vec<Box<dyn ToSql>>, Option<Stri
let mut id_searches: Vec<String> = vec![];
for id in idvec {
id_searches.push("event_hash=?".to_owned());
params.push(Box::new(id.clone()));
let id_bin = hex::decode(id).ok();
params.push(Box::new(id_bin));
}
if idvec.is_empty() {
// if the ids list was empty, we should never return