alert error message is an error is returned instead of rows

This commit is contained in:
Isaac Connor 2021-11-09 10:50:39 -05:00
parent 5d93e9a957
commit dd542d5b30
1 changed files with 5 additions and 1 deletions

View File

@ -41,6 +41,10 @@ function ajaxRequest(params) {
}
$j.getJSON(thisUrl + '?view=request&request=events&task=query'+filterQuery, params.data)
.done(function(data) {
if (data.result == 'Error') {
alert(data.message);
return;
}
var rows = processRows(data.rows);
// rearrange the result into what bootstrap-table expects
params.success({total: data.total, totalNotFiltered: data.totalNotFiltered, rows: rows});