Handle dropdown queries which are detached from data source#3453
Merged
Conversation
added 2 commits
February 17, 2019 20:16
that no longer exist
added 3 commits
February 20, 2019 13:46
…ithub.com:getredash/redash into handle-dropdown-queries-detached-from-data-source
arikfr
reviewed
Mar 16, 2019
| 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) |
Member
There was a problem hiding this comment.
I'm assuming the tests fail because of the cyclic import issue. Maybe use query.org here instead of current_org?
Contributor
Author
There was a problem hiding this comment.
Actually that import was already handled elsewhere. Fixed.
harveyrendell
pushed a commit
to pushpay/redash
that referenced
this pull request
Nov 14, 2019
…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 file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR handles an edge case where dropdown queries point to a data source that no longer exists.