Skip to content
Snippets Groups Projects
Commit 7b410131 authored by Erik Johnston's avatar Erik Johnston Committed by GitHub
Browse files

Merge pull request #2118 from matrix-org/erikj/no_devices

Fix getting latest device IP for user with no devices
parents f3cf3ff8 85657eed
No related branches found
No related tags found
No related merge requests found
......@@ -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 "
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment