fix for genericrelation saving

This commit is contained in:
S. Andrew Sheppard 2013-12-23 22:31:31 -06:00
parent 25bd6d1d4b
commit d30ce2575c

View File

@ -894,7 +894,7 @@ class ModelSerializer(Serializer):
m2m_data[field_name] = attrs.pop(field_name)
# Forward m2m relations
for field in meta.many_to_many:
for field in meta.many_to_many + meta.virtual_fields:
if field.name in attrs:
m2m_data[field.name] = attrs.pop(field.name)