#424 creating a local user ends with an integrity error
Closed: Fixed None Opened 6 years ago by dmach.

PAGURE_AUTH = 'local'

then try to create a new user; it ends with:

IntegrityError: (sqlite3.IntegrityError) NOT NULL constraint failed: users.default_email [SQL: u'INSERT INTO users (user, fullname, public_ssh_key, default_email, password, token, created, updated_on) VALUES (?, ?, ?, ?, ?, ?, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP)'] [parameters: (u'dm', u'DM', None, None, '...', '...')]

Do you want to fix this or shall I take a look at it?

From a quick look maybe:

diff --git a/ pagure/ui/login.py b/ pagure/ui/login.py
index dee3a07..162da40 100644
--- a/ pagure/ui/login.py       
+++ b/ pagure/ui/login.py       
@@ -53,6 +53,7 @@ def new_user():
         user = model.User()
         user.token = token
+        user.default_email = form.email_address.data

could help

Login to comment on this ticket.