Changeset - 5f13634aa7be
[Not reviewed]
default
0 1 0
Mads Kiilerich - 11 years ago 2014-09-24 14:24:40
madski@unity3d.com
helpers: fix crash on new users without email (Issue #28)
1 file changed with 2 insertions and 0 deletions:
0 comments (0 inline, 0 general)
kallithea/lib/helpers.py
Show inline comments
 
@@ -493,12 +493,14 @@ def is_hg(repository):
 
    else:
 
        _type = repository
 
    return _type == 'hg'
 

	
 

	
 
def email_or_none(author):
 
    if not author:
 
        return None
 
    # extract email from the commit string
 
    _email = email(author)
 
    if _email:
 
        # check it against Kallithea database, and use the MAIN email for this
 
        # user
 
        user = User.get_by_email(_email, case_insensitive=True, cache=True)
0 comments (0 inline, 0 general)