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

Commit 91ec5f06 by Sascha Depold

Fix condition in model wide validation

1 parent 41a9e502
Showing with 1 additions and 1 deletions
......@@ -327,7 +327,7 @@ var Pub = Sequelize.define('Pub', {
}, {
validate: {
bothCoordsOrNone: function() {
if ((this.latitude === null) === (this.longitude === null)) {
if ((this.latitude === null) !== (this.longitude === null)) {
throw new Error('Require either both latitude and longitude or neither')
}
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!