Commit f072979a by ichuang

fix error in student views - js was undefined in _do_create_account

parent da9742a8
...@@ -297,6 +297,7 @@ def _do_create_account(post_vars): ...@@ -297,6 +297,7 @@ def _do_create_account(post_vars):
try: try:
user.save() user.save()
except IntegrityError: except IntegrityError:
js = {'success': False}
# Figure out the cause of the integrity error # Figure out the cause of the integrity error
if len(User.objects.filter(username=post_vars['username'])) > 0: if len(User.objects.filter(username=post_vars['username'])) > 0:
js['value'] = "An account with this username already exists." js['value'] = "An account with this username already exists."
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment