This was a very simple update. The gmg command adduser
was generating an
unncessary error because we were searching for a non-unicode string value in a Unicode column of the core__users table.
This commit is contained in:
parent
4b24678a1f
commit
4285fc67b3
@ -34,7 +34,7 @@ def adduser(args):
|
|||||||
#TODO: Lets trust admins this do not validate Emails :)
|
#TODO: Lets trust admins this do not validate Emails :)
|
||||||
commands_util.setup_app(args)
|
commands_util.setup_app(args)
|
||||||
|
|
||||||
args.username = commands_util.prompt_if_not_set(args.username, "Username:")
|
args.username = unicode(commands_util.prompt_if_not_set(args.username, "Username:"))
|
||||||
args.password = commands_util.prompt_if_not_set(args.password, "Password:",True)
|
args.password = commands_util.prompt_if_not_set(args.password, "Password:",True)
|
||||||
args.email = commands_util.prompt_if_not_set(args.email, "Email:")
|
args.email = commands_util.prompt_if_not_set(args.email, "Email:")
|
||||||
|
|
||||||
@ -50,7 +50,7 @@ def adduser(args):
|
|||||||
else:
|
else:
|
||||||
# Create the user
|
# Create the user
|
||||||
entry = db.User()
|
entry = db.User()
|
||||||
entry.username = unicode(args.username.lower())
|
entry.username = args.username.lower()
|
||||||
entry.email = unicode(args.email)
|
entry.email = unicode(args.email)
|
||||||
entry.pw_hash = auth.gen_password_hash(args.password)
|
entry.pw_hash = auth.gen_password_hash(args.password)
|
||||||
default_privileges = [
|
default_privileges = [
|
||||||
|
Loading…
x
Reference in New Issue
Block a user