mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2024-10-01 11:49:51 -04:00
Handle error slightly better
This commit is contained in:
parent
f0979afdb0
commit
ed88720952
@ -188,6 +188,7 @@ class ReceiptsStore(SQLBaseStore):
|
|||||||
linearized_event_id = event_ids[0]
|
linearized_event_id = event_ids[0]
|
||||||
else:
|
else:
|
||||||
# we need to points in graph -> linearized form.
|
# we need to points in graph -> linearized form.
|
||||||
|
# TODO: Make this better.
|
||||||
def graph_to_linear(txn):
|
def graph_to_linear(txn):
|
||||||
query = (
|
query = (
|
||||||
"SELECT event_id WHERE room_id = ? AND stream_ordering IN ("
|
"SELECT event_id WHERE room_id = ? AND stream_ordering IN ("
|
||||||
@ -200,8 +201,7 @@ class ReceiptsStore(SQLBaseStore):
|
|||||||
if rows:
|
if rows:
|
||||||
return rows[0][0]
|
return rows[0][0]
|
||||||
else:
|
else:
|
||||||
# TODO: ARGH?!
|
raise RuntimeError("Unrecognized event_ids: %r" % (event_ids,))
|
||||||
return None
|
|
||||||
|
|
||||||
linearized_event_id = yield self.runInteraction(
|
linearized_event_id = yield self.runInteraction(
|
||||||
"insert_receipt_conv", graph_to_linear
|
"insert_receipt_conv", graph_to_linear
|
||||||
|
Loading…
Reference in New Issue
Block a user