Fix v2 verify output SQL error
authorJakob Cornell <jakob+gpg@jcornell.net>
Sat, 16 Apr 2022 00:05:20 +0000 (19:05 -0500)
committerJakob Cornell <jakob+gpg@jcornell.net>
Sat, 16 Apr 2022 00:05:20 +0000 (19:05 -0500)
disk_jumble/src/disk_jumble/verify.py

index 759876f452810ba181a74b3e67efb6924a025c9c..1252ff33fbee3c41532c5d656da023584fd37460 100644 (file)
@@ -350,7 +350,7 @@ def do_verify_v2(conn, disk_id: int, disk_file: io.BufferedIOBase, read_size: in
                                                        ),
                                                        _ as (
                                                                insert into diskjumble.verify_piece_content
-                                                               values (new_piece.verify_id, 0, %s, %s)
+                                                               select (verify_id, 0, %s, %s) from new_piece
                                                        )
                                                insert into diskjumble.verify_piece_fail
                                                select verify_id from new_piece