Skip to content

Commit

Permalink
use currently selected data source when no source attached to saved q…
Browse files Browse the repository at this point in the history
…uery

Signed-off-by: Amardeepsingh Siglani <[email protected]>
  • Loading branch information
amsiglan committed Nov 16, 2024
1 parent ab4e6e8 commit c7d1e77
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,9 @@ export function OpenSavedQueryFlyout({
if (selectedQuery) {
if (
// Template queries are not associated with data sources. Apply data source from current query
selectedQuery.attributes.isTemplate
selectedQuery.attributes.isTemplate ||
// Associating a saved query with a data source is optional. If no data source is present, keep the current source.
!selectedQuery.attributes.query.dataset?.dataSource
) {
const updatedQuery: Query = {
...queryStringManager?.getQuery(),
Expand Down

0 comments on commit c7d1e77

Please sign in to comment.