Skip to content

Commit

Permalink
[Data-Grid] Fixed a bug which caused an invalid SQL query on disabled…
Browse files Browse the repository at this point in the history
… soft-deletion.
  • Loading branch information
Jack12816 committed Oct 22, 2013
1 parent 6cc2596 commit af6209a
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/helper/controller/data-grid.js
Expand Up @@ -167,7 +167,12 @@ DataGrid.prototype.buildSqlCriteria = function(req, res, options)
order = req.query.oprop + ' ' + req.query.order.toUpperCase();
}

sqlCriteria.where = where + (options.where ? ' ' + options.where : '');
if ('undefined' === typeof where) {
sqlCriteria.where = (options.where ? options.where : undefined);
} else {
sqlCriteria.where = where + (options.where ? ' ' + options.where : '');
}

sqlCriteria.order = order;

return sqlCriteria;
Expand Down

0 comments on commit af6209a

Please sign in to comment.