Commit 7d8c9514 by kazmiruk

remove list\tuple changes from PR

parent e3522e8a
......@@ -992,15 +992,12 @@ class ModelSerializer(Serializer):
if field_name in attrs:
m2m_data[field_name] = attrs.pop(field_name)
def _inner_loop_code(field):
# Forward m2m relations
for field in meta.many_to_many + meta.virtual_fields:
if isinstance(field, GenericForeignKey):
return
continue
if field.name in attrs:
m2m_data[field.name] = attrs.pop(field.name)
# Forward m2m relations
[_inner_loop_code(field) for field in meta.many_to_many]
[_inner_loop_code(field) for field in meta.virtual_fields]
m2m_data[field.name] = attrs.pop(field.name)
# Nested forward relations - These need to be marked so we can save
# them before saving the parent model instance.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment