From 4e52d8847f8cd9909de7ad19bb4b88629f631a0f Mon Sep 17 00:00:00 2001 From: hernani Date: Thu, 22 Dec 2011 19:04:11 +0000 Subject: [PATCH] Small fix on the new get method for users. git-svn-id: http://svn.osqa.net/svnroot/osqa/trunk@1218 0cfe37f9-358a-4d5e-be75-b63607b5c754 --- forum/models/user.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/forum/models/user.py b/forum/models/user.py index 7f15d21..695501f 100644 --- a/forum/models/user.py +++ b/forum/models/user.py @@ -117,7 +117,7 @@ class UserManager(CachedManager): if len(matching_users) == 1: return matching_users[0] - else: + elif len(matching_users) > 1: for user in matching_users: if user.username == kwargs['username']: return user -- 2.39.5