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

Commit 42b10a71 by Mick Hansen

Merge pull request #4518 from festo/master

Fix recursively inject 'where' with defaultScope and paranoid:true
2 parents c0bcf5ce 0d72ea15
Showing with 2 additions and 0 deletions
...@@ -2541,6 +2541,8 @@ Model.prototype.$getDefaultTimestamp = function(attr) { ...@@ -2541,6 +2541,8 @@ Model.prototype.$getDefaultTimestamp = function(attr) {
// Inject current scope into options. Includes should have been conformed (conformOptions) before calling this // Inject current scope into options. Includes should have been conformed (conformOptions) before calling this
Model.$injectScope = function (scope, options) { Model.$injectScope = function (scope, options) {
scope = optClone(scope);
var filteredScope = _.omit(scope, 'include'); // Includes need special treatment var filteredScope = _.omit(scope, 'include'); // Includes need special treatment
_.defaults(options, filteredScope); _.defaults(options, filteredScope);
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!