diff --git a/common/lib/xmodule/xmodule/video_module/video_handlers.py b/common/lib/xmodule/xmodule/video_module/video_handlers.py index 41d93e5dbc..7770c9d0c0 100644 --- a/common/lib/xmodule/xmodule/video_module/video_handlers.py +++ b/common/lib/xmodule/xmodule/video_module/video_handlers.py @@ -55,9 +55,7 @@ class VideoStudentViewHandlers(object): if dispatch == 'save_user_state': for key in data: - if type(key) == str: - key = unicode(key, "UTF8") - if hasattr(self, key.encode('utf8')) and key in accepted_keys: + if key in accepted_keys: if key in conversions: value = conversions[key](data[key]) else: diff --git a/lms/djangoapps/courseware/tests/test_video_handlers.py b/lms/djangoapps/courseware/tests/test_video_handlers.py index 2e92563674..5c3572417b 100644 --- a/lms/djangoapps/courseware/tests/test_video_handlers.py +++ b/lms/djangoapps/courseware/tests/test_video_handlers.py @@ -153,7 +153,7 @@ class TestVideo(BaseTestXmodule): self.item_descriptor.handle_ajax('save_user_state', {'transcript_language': "uk"}) self.assertEqual(self.item_descriptor.transcript_language, 'uk') - response = self.item_descriptor.handle_ajax('save_user_state', {'demoo�': "sample"}) + response = self.item_descriptor.handle_ajax('save_user_state', {u'demoo�': "sample"}) self.assertEqual(json.loads(response)['success'], True)