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

Commit 3150ef40 by Mick Hansen

Don't assume a field in fields is actually a valid attribute.

1 parent c61753df
Showing with 1 additions and 1 deletions
...@@ -592,7 +592,7 @@ module.exports = (function() { ...@@ -592,7 +592,7 @@ module.exports = (function() {
} }
// Field name mapping // Field name mapping
if (self.Model.rawAttributes[attr].field && self.Model.rawAttributes[attr].field !== attr) { if (self.Model.rawAttributes[attr] && self.Model.rawAttributes[attr].field && self.Model.rawAttributes[attr].field !== attr) {
values[self.Model.rawAttributes[attr].field] = values[attr]; values[self.Model.rawAttributes[attr].field] = values[attr];
delete values[attr]; delete values[attr];
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!