Commit ae6ca745 by Mark Aaron Shirley

Merge remote-tracking branch 'upstream/master' into writable-serializers

parents c6a6d7ac c29b08ad
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
### Master ### Master
* Bugfix: Fix exception in browseable API on DELETE.
* Bugfix: Fix issue where pk was was being set to a string if set by URL kwarg. * Bugfix: Fix issue where pk was was being set to a string if set by URL kwarg.
### 2.1.11 ### 2.1.11
......
...@@ -124,6 +124,6 @@ class DestroyModelMixin(object): ...@@ -124,6 +124,6 @@ class DestroyModelMixin(object):
Should be mixed in with `SingleObjectBaseView`. Should be mixed in with `SingleObjectBaseView`.
""" """
def destroy(self, request, *args, **kwargs): def destroy(self, request, *args, **kwargs):
self.object = self.get_object() obj = self.get_object()
self.object.delete() obj.delete()
return Response(status=status.HTTP_204_NO_CONTENT) return Response(status=status.HTTP_204_NO_CONTENT)
...@@ -444,19 +444,19 @@ class CacheRenderTest(TestCase): ...@@ -444,19 +444,19 @@ class CacheRenderTest(TestCase):
return return
if state == None: if state == None:
return return
if isinstance(state,tuple): if isinstance(state, tuple):
if not isinstance(state[0],dict): if not isinstance(state[0], dict):
state=state[1] state = state[1]
else: else:
state=state[0].update(state[1]) state = state[0].update(state[1])
result = {} result = {}
for i in state: for i in state:
try: try:
pickle.dumps(state[i],protocol=2) pickle.dumps(state[i], protocol=2)
except pickle.PicklingError: except pickle.PicklingError:
if not state[i] in seen: if not state[i] in seen:
seen.append(state[i]) seen.append(state[i])
result[i] = cls._get_pickling_errors(state[i],seen) result[i] = cls._get_pickling_errors(state[i], seen)
return result return result
def http_resp(self, http_method, url): def http_resp(self, http_method, url):
......
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