fix error in student views - js was undefined in _do_create_account

This commit is contained in:
ichuang
2012-08-12 18:45:24 -04:00
parent da9742a88a
commit f072979a6c

View File

@@ -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."