aboutsummaryrefslogtreecommitdiffstats
path: root/rest_framework/mixins.py
diff options
context:
space:
mode:
authorTom Christie2014-10-03 13:42:06 +0100
committerTom Christie2014-10-03 13:42:06 +0100
commit3a3e2bf57d5443dc0b058d5beb3111f87c418947 (patch)
tree48dfb01c88307bc01d6b1350826505708bb30fb8 /rest_framework/mixins.py
parente6c5ebdda6d0f169f21498909e2d390c460138a9 (diff)
downloaddjango-rest-framework-3a3e2bf57d5443dc0b058d5beb3111f87c418947.tar.bz2
Serializer.save() takes keyword arguments, not 'extras' argument
Diffstat (limited to 'rest_framework/mixins.py')
-rw-r--r--rest_framework/mixins.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/rest_framework/mixins.py b/rest_framework/mixins.py
index de334b4b..bc4ce22f 100644
--- a/rest_framework/mixins.py
+++ b/rest_framework/mixins.py
@@ -101,8 +101,8 @@ class AllowPUTAsCreateMixin(object):
if instance is None:
lookup_url_kwarg = self.lookup_url_kwarg or self.lookup_field
lookup_value = self.kwargs[lookup_url_kwarg]
- extras = {self.lookup_field: lookup_value}
- serializer.save(extras=extras)
+ extra_kwargs = {self.lookup_field: lookup_value}
+ serializer.save(**extra_kwargs)
return Response(serializer.data, status=status.HTTP_201_CREATED)
serializer.save()