This commit is contained in:
Paul Melnikow 2014-01-13 09:47:33 -08:00
commit 81d98ef760

View File

@ -163,6 +163,7 @@ class UpdateModelMixin(object):
"""
Set any attributes on the object that are implicit in the request.
"""
super(UpdateModelMixin, self).pre_save(obj)
# pk and/or slug attributes are implicit in the URL.
lookup_url_kwarg = self.lookup_url_kwarg or self.lookup_field
lookup = self.kwargs.get(lookup_url_kwarg, None)