浏览代码

Fixed bug in user creation

Denis Merigoux 9 年之前
父节点
当前提交
33f1d98815
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      counter/views.py

+ 1 - 1
counter/views.py

@@ -386,7 +386,7 @@ def createUser(request):
386 386
         nick = data['nick'][0]
387 387
         password1 = data['password1'][0]
388 388
         password2 = data['password2'][0]
389
-        email_notifications = (data['email_notifications'][0] == "on")
389
+        email_notifications = ('email_notifications' in data.keys())
390 390
 
391 391
         if password1 != password2:
392 392
             error = "Les deux mots de passe sont différents."