Skip to content

Commit

Permalink
fix browse rows query error handling + boolean filter value (close ha…
Browse files Browse the repository at this point in the history
  • Loading branch information
arvi3411301 authored and rikinsk committed Jun 28, 2019
1 parent aae6887 commit c85986c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
Expand Up @@ -72,7 +72,11 @@ const runQuery = tableSchema => {
return w;
}
if (colType === 'boolean') {
w[colName][opName] = val === 'true' ? true : false;
if (val === 'true') {
w[colName][opName] = true;
} else if (val === 'false') {
w[colName][opName] = false;
}
}
return w;
});
Expand Down
Expand Up @@ -12,7 +12,6 @@ import dataHeaders from '../Common/Headers';
/* ****************** View actions *************/
const V_SET_DEFAULTS = 'ViewTable/V_SET_DEFAULTS';
const V_REQUEST_SUCCESS = 'ViewTable/V_REQUEST_SUCCESS';
const V_REQUEST_ERROR = 'ViewTable/V_REQUEST_ERROR';
const V_EXPAND_REL = 'ViewTable/V_EXPAND_REL';
const V_CLOSE_REL = 'ViewTable/V_CLOSE_REL';
const V_SET_ACTIVE = 'ViewTable/V_SET_ACTIVE';
Expand Down Expand Up @@ -101,7 +100,12 @@ const vMakeRequest = () => {
}
},
error => {
dispatch({ type: V_REQUEST_ERROR, data: error });
Promise.all([
dispatch(
showErrorNotification('Browse query failed!', error.error, error)
),
dispatch({ type: V_REQUEST_PROGRESS, data: false }),
]);
}
);
};
Expand Down

0 comments on commit c85986c

Please sign in to comment.