aboutsummaryrefslogtreecommitdiffstats
path: root/djangorestframework/mixins.py
diff options
context:
space:
mode:
Diffstat (limited to 'djangorestframework/mixins.py')
-rw-r--r--djangorestframework/mixins.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/djangorestframework/mixins.py b/djangorestframework/mixins.py
index 9f65625e..b1c0d815 100644
--- a/djangorestframework/mixins.py
+++ b/djangorestframework/mixins.py
@@ -524,8 +524,7 @@ class CreateModelMixin(object):
for field in model._meta.many_to_many:
if content.has_key(field.name):
m2m_data[field.name] = (
- model._meta.many_to_many[0].m2m_reverse_field_name(),
- content[field.name]
+ field.m2m_reverse_field_name(), content[field.name]
)
del content[field.name]