Skip to content

Commit

Permalink
[dqt] fix loading saved query (#8436)
Browse files Browse the repository at this point in the history
Reverting the code back to what it was when it was introduced as the 'keys' parameter in the query string wasn't changed back.
  • Loading branch information
zaliqarosli committed Mar 22, 2023
1 parent 99f2698 commit c500dc1
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions modules/dqt/jsx/react.app.js
Original file line number Diff line number Diff line change
Expand Up @@ -682,23 +682,23 @@ class DataQueryApp extends Component {
alertSaved: false,
loading: false,
});
for (let i = 0; i < fieldsList.length; i++) {
$.ajax({
url: loris.BaseURL + '/dqt/ajax/datadictionary.php',
success: (data) => {
if (data[0] && data[0].value.IsFile) {
let key = data[0].key[0] + ',' + data[0].key[1];
$.ajax({
url: loris.BaseURL + '/dqt/ajax/datadictionary.php',
success: (data) => {
for (let i = 0; i < fieldsList.length; i++) {
if (data[i] && data[i].value.IsFile) {
let key = data[i].key[0] + ',' + data[i].key[1];
let downloadable = this.state.downloadableFields;
downloadable[key] = true;
this.setState({
downloadableFields: downloadable,
});
}
},
data: {key: fieldsList[i]},
dataType: 'json',
});
}
}
},
data: {keys: JSON.stringify(fieldsList)},
dataType: 'json',
});
}

/**
Expand Down

0 comments on commit c500dc1

Please # to comment.