From f072979a6cf084c1fa150934b9e616bb580fe289 Mon Sep 17 00:00:00 2001 From: ichuang Date: Sun, 12 Aug 2012 18:45:24 -0400 Subject: [PATCH] fix error in student views - js was undefined in _do_create_account --- common/djangoapps/student/views.py | 1 + 1 file changed, 1 insertion(+) diff --git a/common/djangoapps/student/views.py b/common/djangoapps/student/views.py index 8093a5a51a..c88aeaf337 100644 --- a/common/djangoapps/student/views.py +++ b/common/djangoapps/student/views.py @@ -297,6 +297,7 @@ def _do_create_account(post_vars): try: user.save() except IntegrityError: + js = {'success': False} # Figure out the cause of the integrity error if len(User.objects.filter(username=post_vars['username'])) > 0: js['value'] = "An account with this username already exists."