We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e7328c5 commit 06c2ac1Copy full SHA for 06c2ac1
store/backend/manage.py
@@ -142,10 +142,14 @@ def backfill_note_keys(limit, dry_run):
142
if inferred:
143
updated += 1
144
if not dry_run:
145
- conn.execute(
146
- sa.text("UPDATE annotations SET note_keys = :note_keys WHERE id = :id"),
147
- {"id": annot_id, "note_keys": inferred},
+ payload = {k: v for k, v in inferred.items()}
+ stmt = sa.text(
+ "UPDATE annotations SET note_keys = :note_keys WHERE id = :id"
148
+ ).bindparams(
149
+ sa.bindparam("note_keys", type_=sa.JSON),
150
+ sa.bindparam("id"),
151
)
152
+ conn.execute(stmt, {"id": annot_id, "note_keys": payload})
153
154
if updated and not dry_run:
155
db.session.commit()
0 commit comments