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

Commit c61753df by Mick Hansen

Don't assume attributes passed to find are actually model attributes

1 parent 78c58323
Showing with 1 additions and 1 deletions
......@@ -1726,7 +1726,7 @@ module.exports = (function() {
// Object lookups will force any variable to strings, we don't want that for special objects etc
if (typeof attr !== "string") return attr;
// Map attributes to aliased syntax attributes
if (attr !== Model.rawAttributes[attr].field) {
if (Model.rawAttributes[attr] && attr !== Model.rawAttributes[attr].field) {
return [Model.rawAttributes[attr].field, attr];
}
return attr;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!