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

$box operator causes error, while query works fine on mongo shell #1122

Closed
rajesh-krishnan opened this issue Mar 16, 2018 · 1 comment
Closed
Milestone

Comments

@rajesh-krishnan
Copy link

Thank you for developing and maintaining Eve, a wonderful package.

A query such as: ?where={"user_location":{"$geoWithin":{"$box":[[-125.0,25.1],[-60.5,49.1]]}}}
over the REST API causes an error: Query contains unknown or unsupported operators: $box

The same query works fine in mongo shell. Is there a reason this operator is not supported?
Adding $box to the operators set in eve/io/mongo/mongo.py seems to fix the problem.

@nicolaiarocci
Copy link
Member

Yes, looks like the box operator could be added without harm. Feel free to submit a PR for it, I'll gladly review it.

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

No branches or pull requests

2 participants