Skip to content

Commit

Permalink
[#3071] Regenerating API Key fails for users missing required columns…
Browse files Browse the repository at this point in the history
… (ex: email)
  • Loading branch information
Artem Bazykin committed Feb 20, 2017
1 parent b582c7a commit 487d5fa
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions ckan/lib/cli.py
Expand Up @@ -684,9 +684,14 @@ def add(self):
print 'User "%s" not found' % username
makeuser = raw_input('Create new user: %s? [y/n]' % username)
if makeuser == 'y':
useremail = raw_input('Please input %s email: ' % username)
if not useremail:
print 'Need email to create new user'
return
password = UserCmd.password_prompt()
print('Creating %s user' % username)
user = model.User(name=unicode(username),
email=unicode(useremail),
password=password)
else:
print 'Exiting ...'
Expand Down

0 comments on commit 487d5fa

Please sign in to comment.