From 0c80f878278dd7c7458858de61a635771ba59675 Mon Sep 17 00:00:00 2001 From: Jakob Cornell Date: Sun, 17 Apr 2022 14:06:14 -0500 Subject: [PATCH] Add necessary type casts to verify DML --- disk_jumble/src/disk_jumble/verify.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/disk_jumble/src/disk_jumble/verify.py b/disk_jumble/src/disk_jumble/verify.py index f5db002..60a53e5 100644 --- a/disk_jumble/src/disk_jumble/verify.py +++ b/disk_jumble/src/disk_jumble/verify.py @@ -85,7 +85,7 @@ def _get_v1_worklist(conn, disk_id: int, block_ranges: List[NumericRange]) -> Li diskjumble.slab left join bittorrent.torrent_info on digest(info, 'sha1') = entity_id ) - where disk_id = %s and disk_blocks && any (%s) + where disk_id = %s and disk_blocks && any (%s::int8range[]) """, (disk_id, block_ranges) ) @@ -221,7 +221,7 @@ def _get_v2_worklist(conn, disk_id: int, block_ranges: List[NumericRange]) -> Li from filtered ) select * from exploded - where block <@ any (%(block_ranges)s) + where block <@ any (%(block_ranges)s::int8range[]) order by block """, { -- 2.30.2