Skip to content

Commit

Permalink
go to /api/:id/dropdown while editing a query, since dropdown queries…
Browse files Browse the repository at this point in the history
… might still not be associated with the parent. see #3711
  • Loading branch information
Omer Lachish committed Apr 17, 2019
1 parent 5a782cb commit bc48a23
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion client/app/components/QueryBasedParameterInput.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export class QueryBasedParameterInput extends React.Component {
async _loadOptions(queryId) {
if (queryId && (queryId !== this.state.queryId)) {
this.setState({ loading: true });
const options = await this.props.parameter.loadDropdownValues();
const options = await this.props.parameter.loadDropdownValues(this.props.isDirty);

// stale queryId check
if (this.props.queryId === queryId) {
Expand Down
4 changes: 2 additions & 2 deletions client/app/services/query.js
Original file line number Diff line number Diff line change
Expand Up @@ -202,8 +202,8 @@ export class Parameter {
return `{{ ${this.name} }}`;
}

loadDropdownValues() {
if (this.parentQueryId) {
loadDropdownValues(isDirty) {
if (this.parentQueryId && !isDirty) {
return Query.associatedDropdown({ queryId: this.parentQueryId, dropdownQueryId: this.queryId }).$promise;
}

Expand Down

0 comments on commit bc48a23

Please sign in to comment.