mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-11-23 01:57:00 +03:00
fix for genericrelation saving
This commit is contained in:
parent
25bd6d1d4b
commit
d30ce2575c
|
@ -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)
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user