From 7d1c1b464932638499ed366ea65ef572a25a8c1d Mon Sep 17 00:00:00 2001 From: Alan Braithwaite Date: Fri, 4 Apr 2014 14:41:55 -0700 Subject: [PATCH] Cleanup kludge --- rest_framework/serializers.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/rest_framework/serializers.py b/rest_framework/serializers.py index dba9fd9f0..907c19ae0 100644 --- a/rest_framework/serializers.py +++ b/rest_framework/serializers.py @@ -133,7 +133,7 @@ def _is_protected_type(obj): def _convert_fields(data, mapping): """ Takes data as dict or none and str->str map of keys and - returns None or dictionary with converted keys + returns None or new dictionary with converted keys """ # Handle translation of serialized fields into non serailzed fields if data is not None: @@ -149,9 +149,6 @@ def _convert_fields(data, mapping): except AttributeError: value = translated_data.pop(key) translated_data[newkey] = value - -# for key in translated_data.keys(): -# if key in mapping: else: # Data can be None so translated_data is too translated_data = None