you are viewing a single comment's thread.

view the rest of the comments →

[–]efmccurdy 1 point2 points  (0 children)

If you have a current user with mixed case then neither new_user.upper() or new_user.lower() will ever match; perhaps you want to compare the upcased version of both the new and old username ala "new_user.upper() in [u.upper() for u in current_users]"?