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

Using "sortby":"category" results in an internal server error #120

Closed
koebi opened this issue Jan 10, 2022 · 2 comments
Closed

Using "sortby":"category" results in an internal server error #120

koebi opened this issue Jan 10, 2022 · 2 comments

Comments

@koebi
Copy link

koebi commented Jan 10, 2022

This problem has been reported by a user in the ask-forum and can be reproduced via the playground:
Screenshot 2022-01-10 at 09-32-20 Pois Post ORS API

Removing sortby or switching to distance makes the problem disappear.

@koebi
Copy link
Author

koebi commented Jan 11, 2022

This problem seems to have existed for a bit…

I think the problem is that the query used for requesting pois is

bbox_query = db.session \
.query(POIs) \
.filter(*geom_filters) \
.subquery()

which does not include any information about categories.
When defining what to sort by, however, it tries to use the category column from the query above, which does not exist:

sortby_group.append(bbox_query.c.category)

I don't know how to fix this though…

@koebi
Copy link
Author

koebi commented Jan 12, 2022

Was fixed in #121.

@koebi koebi closed this as completed Jan 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant