diff --git a/common/djangoapps/user_api/api/profile.py b/common/djangoapps/user_api/api/profile.py index 4b18b6c1e6..35356b6256 100644 --- a/common/djangoapps/user_api/api/profile.py +++ b/common/djangoapps/user_api/api/profile.py @@ -73,7 +73,7 @@ def profile_info(username): "year_of_birth": profile.year_of_birth, "goals": profile.goals, "city": profile.city, - "country": profile.country, + "country": unicode(profile.country), } return profile_dict diff --git a/common/djangoapps/user_api/tests/test_profile_api.py b/common/djangoapps/user_api/tests/test_profile_api.py index 823985588c..5f78c0a832 100644 --- a/common/djangoapps/user_api/tests/test_profile_api.py +++ b/common/djangoapps/user_api/tests/test_profile_api.py @@ -28,6 +28,12 @@ class ProfileApiTest(TestCase): 'username': self.USERNAME, 'email': self.EMAIL, 'full_name': u'', + 'goals': None, + 'level_of_education': None, + 'mailing_address': None, + 'year_of_birth': None, + 'country': '', + 'city': None, }) def test_update_full_name(self):