From af6d101c214d003183c01c344d61498d97bf78ff Mon Sep 17 00:00:00 2001 From: Daniel Cadenas Date: Mon, 29 Jul 2024 12:01:12 -0300 Subject: [PATCH] fix: id based sqlite query Queries using the `id` field were failing after the refactor of removing hexranges. --- src/repo/sqlite.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/repo/sqlite.rs b/src/repo/sqlite.rs index 2b2ba24..a69697a 100644 --- a/src/repo/sqlite.rs +++ b/src/repo/sqlite.rs @@ -1016,7 +1016,8 @@ fn query_from_filter(f: &ReqFilter) -> (String, Vec>, Option = 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