Minor fix
This commit is contained in:
parent
1487a592c1
commit
cd2cc68905
|
@ -1431,8 +1431,9 @@ RelationDefinition.embedsMany = function hasMany(modelFrom, modelTo, params) {
|
|||
if (item instanceof modelTo) {
|
||||
if (!item.isValid()) {
|
||||
hasErrors = true;
|
||||
var id = item[idName] || '(blank)';
|
||||
var first = Object.keys(item.errors)[0];
|
||||
var msg = 'contains invalid item: `' + item[idName] + '`';
|
||||
var msg = 'contains invalid item: `' + id + '`';
|
||||
msg += ' (' + first + ' ' + item.errors[first] + ')';
|
||||
this.errors.add(relationName, msg, 'invalid');
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue