Skip to content

Commit 2bcc80d

Browse files
committed
Make relationshipType backwards compatible
1 parent 6c5c508 commit 2bcc80d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/serializer.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ DS.DjangoRESTSerializer = DS.RESTSerializer.extend({
199199

200200
var key = relationship.key,
201201
json_key = this.keyForRelationship(key, "hasMany"),
202-
relationshipType = record.constructor.determineRelationshipType(relationship);
202+
relationshipType = DS.RelationshipChange ? DS.RelationshipChange.determineRelationshipType(record.constructor, relationship) : record.constructor.determineRelationshipType(relationship);
203203

204204
if (relationshipType === 'manyToNone' || relationshipType === 'manyToMany') {
205205
json[json_key] = record.get(key).mapBy('id');

0 commit comments

Comments
 (0)