mirror of
https://github.com/element-hq/synapse.git
synced 2024-11-26 03:25:53 +03:00
Merge pull request #2118 from matrix-org/erikj/no_devices
Fix getting latest device IP for user with no devices
This commit is contained in:
commit
7b41013102
1 changed files with 3 additions and 0 deletions
|
@ -120,6 +120,9 @@ class ClientIpStore(background_updates.BackgroundUpdateStore):
|
|||
where_clauses.append("(user_id = ? AND device_id = ?)")
|
||||
bindings.extend((user_id, device_id))
|
||||
|
||||
if not where_clauses:
|
||||
return []
|
||||
|
||||
inner_select = (
|
||||
"SELECT MAX(last_seen) mls, user_id, device_id FROM user_ips "
|
||||
"WHERE %(where)s "
|
||||
|
|
Loading…
Reference in a new issue