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

Commit b81e559e by Mike Ringrose

Simplifying gemoetry check.

1 parent 0b631e03
Showing with 3 additions and 5 deletions
...@@ -361,11 +361,9 @@ Instance.prototype.set = function(key, value, options) { ...@@ -361,11 +361,9 @@ Instance.prototype.set = function(key, value, options) {
} }
} }
if (this.Model._hasGeometryAttributes && this.Model._isGeometryAttribute(key) && value !== null && value !== undefined && !value._isSequelizeMethod) { if (this.Model._hasGeometryAttributes && this.Model._isGeometryAttribute(key) && _.isString(value)) {
if(_.isString(value)){ value = this.dialect.DatatTypes.GEOMETRY.parse(value);
value = this.dialect.DatatTypes.GEOMETRY.parse(value); }
}
}
if (!options.raw && ((primitives.indexOf(typeof value) === -1 && value !== null) || value !== originalValue)) { if (!options.raw && ((primitives.indexOf(typeof value) === -1 && value !== null) || value !== originalValue)) {
this._previousDataValues[key] = originalValue; this._previousDataValues[key] = originalValue;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!