mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2024-10-01 11:49:51 -04:00
event_backwards_extremeties may not be empty
This commit is contained in:
parent
a3036ac37e
commit
eec9609e96
@ -1411,11 +1411,21 @@ class EventsStore(SQLBaseStore):
|
|||||||
to_delete
|
to_delete
|
||||||
)
|
)
|
||||||
|
|
||||||
|
txn.execute(
|
||||||
|
"SELECT event_id FROM event_backward_extremities WHERE room_id = ?",
|
||||||
|
(room_id,)
|
||||||
|
)
|
||||||
|
|
||||||
|
cur_back_event_ids = [event_id for event_id, in txn.fetchall()]
|
||||||
|
|
||||||
# Update backward extremeties
|
# Update backward extremeties
|
||||||
txn.executemany(
|
txn.executemany(
|
||||||
"INSERT INTO event_backward_extremities (room_id, event_id)"
|
"INSERT INTO event_backward_extremities (room_id, event_id)"
|
||||||
" VALUES (?, ?)",
|
" VALUES (?, ?)",
|
||||||
[(room_id, event_id) for event_id, in new_backwards_extrems]
|
[
|
||||||
|
(room_id, event_id) for event_id, in new_backwards_extrems
|
||||||
|
if event_id not in cur_back_event_ids
|
||||||
|
]
|
||||||
)
|
)
|
||||||
|
|
||||||
txn.executemany(
|
txn.executemany(
|
||||||
|
Loading…
Reference in New Issue
Block a user