X-Git-Url: https://git.openstreetmap.org/osqa.git/blobdiff_plain/2d26c0dc1c3847d9b8f8281705d277341ea95ab8..4e52d8847f8cd9909de7ad19bb4b88629f631a0f:/forum/models/user.py 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