Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong SQL syntax in queries.getUserAtHomeAndNotSeenSince #169

Closed
Jean-PhilippeD opened this issue Apr 2, 2017 · 1 comment
Closed

Wrong SQL syntax in queries.getUserAtHomeAndNotSeenSince #169

Jean-PhilippeD opened this issue Apr 2, 2017 · 1 comment

Comments

@Jean-PhilippeD
Copy link
Contributor

Hello,
There is an issue when multiple user in house in query getUserAtHomeAndNotSeenSince in api/core/house/house.queries

I think you should add line 56 GROUP BY user.id because with multiple users, the MAX(event.datetime) takes the max of any users, so when one user is at house and the other(s) have left, Gladys consider nobody's left home because the max return the user still in house.

@Pierre-Gilles
Copy link
Contributor

Sorry for the (really late) reply, you're right!

I'll correct that just after summer !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants