mirror of
https://mau.dev/maunium/synapse.git
synced 2024-10-01 01:36:05 -04:00
avoid access-error if no filter_id matches
This commit is contained in:
parent
eb7cbf27bc
commit
64953c8ed2
@ -56,9 +56,9 @@ class FilteringStore(SQLBaseStore):
|
|||||||
"WHERE user_id = ? AND filter_json = ?"
|
"WHERE user_id = ? AND filter_json = ?"
|
||||||
)
|
)
|
||||||
txn.execute(sql, (user_localpart, def_json))
|
txn.execute(sql, (user_localpart, def_json))
|
||||||
filter_id = txn.fetchone()[0]
|
filter_id_response = txn.fetchone()
|
||||||
if filter_id is not None:
|
if filter_id_response is not None:
|
||||||
return filter_id
|
return filter_id_response[0]
|
||||||
|
|
||||||
sql = (
|
sql = (
|
||||||
"SELECT MAX(filter_id) FROM user_filters "
|
"SELECT MAX(filter_id) FROM user_filters "
|
||||||
|
Loading…
Reference in New Issue
Block a user