From 4285fc67b30e8e97d7ea26e5085438a9bd8ac44b Mon Sep 17 00:00:00 2001 From: tilly-Q Date: Sun, 29 Sep 2013 14:34:41 -0400 Subject: [PATCH] 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. --- mediagoblin/gmg_commands/users.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mediagoblin/gmg_commands/users.py b/mediagoblin/gmg_commands/users.py index 186557e0..71149497 100644 --- a/mediagoblin/gmg_commands/users.py +++ b/mediagoblin/gmg_commands/users.py @@ -34,7 +34,7 @@ def adduser(args): #TODO: Lets trust admins this do not validate Emails :) 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.email = commands_util.prompt_if_not_set(args.email, "Email:") @@ -50,7 +50,7 @@ def adduser(args): else: # Create the user entry = db.User() - entry.username = unicode(args.username.lower()) + entry.username = args.username.lower() entry.email = unicode(args.email) entry.pw_hash = auth.gen_password_hash(args.password) default_privileges = [ -- 2.25.1