Changeset - 1903d3813ac4
[Not reviewed]
default
0 1 0
Søren Løvborg - 9 years ago 2016-09-15 18:08:54
sorenl@unity3d.com
cleanup: don't "return x if x is not None else None"
1 file changed with 1 insertions and 3 deletions:
0 comments (0 inline, 0 general)
kallithea/lib/helpers.py
Show inline comments
 
@@ -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):
0 comments (0 inline, 0 general)