# HG changeset patch # User Søren Løvborg # Date 2016-09-15 18:08:54 # Node ID 1903d3813ac45e11e5c18b843884b576eb596a32 # Parent e99a33d7d7f52226df35197aade67125d164d775 cleanup: don't "return x if x is not None else None" diff --git a/kallithea/lib/helpers.py b/kallithea/lib/helpers.py --- a/kallithea/lib/helpers.py +++ b/kallithea/lib/helpers.py @@ -487,9 +487,7 @@ def user_or_none(author): """Try to match email part of VCS committer string with a local user - or return None""" email = author_email(author) if email: - user = User.get_by_email(email, cache=True) # cache will only use sql_cache_short - if user is not None: - return user + return User.get_by_email(email, cache=True) # cache will only use sql_cache_short return None def email_or_none(author):