From 3ea1fe61a062c90ea052b3d5e4f950c23239752f Mon Sep 17 00:00:00 2001 From: Kostya Esmukov Date: Sun, 7 Feb 2016 18:58:19 +0300 Subject: [PATCH] Fixed _force_text_recursive typo --- rest_framework/exceptions.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rest_framework/exceptions.py b/rest_framework/exceptions.py index 8447a9ded..29afaffe0 100644 --- a/rest_framework/exceptions.py +++ b/rest_framework/exceptions.py @@ -28,7 +28,7 @@ def _force_text_recursive(data): ] if isinstance(data, ReturnList): return ReturnList(ret, serializer=data.serializer) - return data + return ret elif isinstance(data, dict): ret = { key: _force_text_recursive(value) @@ -36,7 +36,7 @@ def _force_text_recursive(data): } if isinstance(data, ReturnDict): return ReturnDict(ret, serializer=data.serializer) - return data + return ret return force_text(data)