Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
Already on GitHub? Sign in to your account
Fix getting latest device IP for user with no devices #2118
Conversation
erikjohnston
assigned
richvdh
Apr 11, 2017
| @@ -90,6 +90,8 @@ def get_last_client_ip_by_device(self, devices): | ||
| are (user_id, device_id) tuples. The values are also dicts, with | ||
| keys giving the column names | ||
| """ | ||
| + if not devices: |
richvdh
Apr 11, 2017
Member
the docstring says devices is an iterable rather than a list, and indeed there are call-sites where it is a generator. An empty generator is truthy, so this isn't going to work.
My inclination would be to skip this and instead bail if where_clauses ends up empty.
Yup guests won't have any devices in the db. |
richvdh
assigned
erikjohnston
and unassigned
richvdh
Apr 11, 2017
erikjohnston
added some commits
Apr 11, 2017
erikjohnston
assigned
richvdh
and unassigned
erikjohnston
Apr 11, 2017
richvdh
assigned
erikjohnston
and unassigned
richvdh
Apr 12, 2017
erikjohnston
merged commit 7b41013
into
develop
Apr 12, 2017
7 of 8 checks passed
Sytest SQLite (Commit)
Build #2853 origin/erikj/no_devices failed in 6 min 6 sec
Details
Sytest Dendron (Commit)
Build #1954 origin/erikj/no_devices succeeded in 9 min 22 sec
Details
Sytest Dendron (Merged PR)
Build finished.
Details
Sytest Postgres (Commit)
Build #2784 origin/erikj/no_devices succeeded in 7 min 9 sec
Details
Sytest Postgres (Merged PR)
Build finished.
Details
Sytest SQLite (Merged PR)
Build finished.
Details
continuous-integration/travis-ci/pr
The Travis CI build passed
Details
continuous-integration/travis-ci/push
The Travis CI build passed
Details
psaavedra
added a commit
to psaavedra/synapse
that referenced
this pull request
May 19, 2017
erikjohnston
deleted the
erikj/no_devices
branch
Oct 26, 2017
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
erikjohnston commentedApr 11, 2017
@richvdh This seems to have been hit by a guest, whom I'm assuming doesn't have any devices?