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:
Piotr Sarnacki 2015-11-11 15:17:00 +01:00
parent ad4d06cb25
commit ca633bdf7b

View File

@ -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) {