fix browse rows query error handling + boolean filter value (close #2421) (#2440)

This commit is contained in:
Aravind Shankar
2019-06-28 16:07:16 +05:30
committed by Rikin Kachhia
parent aae68873da
commit c85986c922
2 changed files with 11 additions and 3 deletions

View File

@@ -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;
});

View File

@@ -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';
@@ -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 }),
]);
}
);
};