不要怂,就是干,撸起袖子干!

Commit 641cbd96 by Malte Legenhausen

findAndCountAll empty include error fixed.

1 parent 504940fc
Showing with 1 additions and 1 deletions
...@@ -874,8 +874,8 @@ module.exports = (function() { ...@@ -874,8 +874,8 @@ module.exports = (function() {
// no limit, offset, order, attributes for the options given to count() // no limit, offset, order, attributes for the options given to count()
, countOptions = _.omit(_.clone(findOptions), ['offset', 'limit', 'order', 'attributes']); , countOptions = _.omit(_.clone(findOptions), ['offset', 'limit', 'order', 'attributes']);
conformOptions(countOptions);
if (countOptions.include) { if (countOptions.include) {
conformOptions(countOptions);
countOptions.include = _.cloneDeep(countOptions.include, function (element) { countOptions.include = _.cloneDeep(countOptions.include, function (element) {
if (element instanceof Model) return element; if (element instanceof Model) return element;
if (element instanceof Association) return element; if (element instanceof Association) return element;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!