-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
Handle dropdown queries which are detached from data source #3453
Handle dropdown queries which are detached from data source #3453
Conversation
that no longer exist
…ithub.com:getredash/redash into handle-dropdown-queries-detached-from-data-source
redash/utils/parameterized_query.py
Outdated
return json_loads(query_result.data) | ||
if query.data_source: | ||
require_access(query.data_source.groups, current_user, view_only) | ||
query_result = models.QueryResult.get_by_id_and_org(query.latest_query_data_id, current_org) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm assuming the tests fail because of the cyclic import issue. Maybe use query.org
here instead of current_org
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually that import was already handled elsewhere. Fixed.
…h#3453) * handle an edge case where dropdown queries are connected to data sources that no longer exist * Rethinking it, an empty result set makes no sense and it's better to throw an error * remove redundant import
This PR handles an edge case where dropdown queries point to a data source that no longer exists.