Don't validate presence of thread id
It's undefined until the first save();
This commit is contained in:
parent
7e9c0e2394
commit
f14cd2eed1
1 changed files with 1 additions and 1 deletions
|
@ -15,7 +15,7 @@ var Whisper = Whisper || {};
|
||||||
},
|
},
|
||||||
|
|
||||||
validate: function(attributes, options) {
|
validate: function(attributes, options) {
|
||||||
var required = ['id', 'type', 'timestamp', 'image', 'name'];
|
var required = ['type', 'timestamp', 'image', 'name'];
|
||||||
var missing = _.filter(required, function(attr) { return !attributes[attr]; });
|
var missing = _.filter(required, function(attr) { return !attributes[attr]; });
|
||||||
if (missing.length) { return "Thread must have " + missing; }
|
if (missing.length) { return "Thread must have " + missing; }
|
||||||
},
|
},
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue