Don't add commit data to included array in build serializer
We already do it in an abstracted way (ie. for all relationships) in v2 fallback serializer.
This commit is contained in:
parent
ad4d06cb25
commit
ca633bdf7b
|
@ -36,18 +36,7 @@ var Serializer = V2FallbackSerializer.extend({
|
|||
}
|
||||
});
|
||||
}
|
||||
result = this._super.apply(this, arguments);
|
||||
store = this.store;
|
||||
result.data.forEach(function(item) {
|
||||
var modelClass, normalized, serializer;
|
||||
if (item.relationships && item.relationships.commit) {
|
||||
serializer = store.serializerFor('commit');
|
||||
modelClass = store.modelFor('commit');
|
||||
normalized = serializer.normalize(modelClass, item.relationships.commit.data);
|
||||
return result.included.push(normalized.data);
|
||||
}
|
||||
});
|
||||
return result;
|
||||
return this._super.apply(this, arguments);
|
||||
},
|
||||
|
||||
keyForV2Relationship: function(key, typeClass, method) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user