Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
Revert back to string interpolation for SQL boolean value
Browse files Browse the repository at this point in the history
Maybe fixes the `sqlite3.OperationalError: no such column: FALSE,` problem in CI,
https://github.com/matrix-org/synapse/runs/3962382283#step:4:11038
  • Loading branch information
MadLittleMods committed Oct 21, 2021
1 parent 2fbe3f1 commit 1d3f417
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions synapse/storage/databases/main/events.py
Original file line number Diff line number Diff line change
Expand Up @@ -2146,14 +2146,14 @@ def _update_backward_extremeties(self, txn, events):
" SELECT 1 FROM events"
" LEFT JOIN event_edges edge"
" ON edge.event_id = events.event_id"
" WHERE events.event_id = ? AND events.room_id = ? AND (events.outlier = FALSE OR edge.event_id IS NULL)"
" WHERE events.event_id = ? AND events.room_id = ? AND (events.outlier = ? OR edge.event_id IS NULL)"
" )"
)

txn.execute_batch(
query,
[
(e_id, ev.room_id, e_id, ev.room_id, e_id, ev.room_id)
(e_id, ev.room_id, e_id, ev.room_id, e_id, ev.room_id, False)
for ev in events
for e_id in ev.prev_event_ids()
if not ev.internal_metadata.is_outlier()
Expand Down

0 comments on commit 1d3f417

Please sign in to comment.