# HG changeset patch # User Chris Cannam # Date 1433244286 -3600 # Node ID 2696466256ff05f5221d9589843e008b74aaccf8 # Parent 322d7b57e5f0e59144a337a2b985ccf28daa0222 Fix erroneous error message when no hits found diff -r 322d7b57e5f0 -r 2696466256ff app/models/repository.rb --- a/app/models/repository.rb Tue Jun 02 10:58:31 2015 +0100 +++ b/app/models/repository.rb Tue Jun 02 12:24:46 2015 +0100 @@ -326,7 +326,9 @@ if username.strip =~ /^([^ ]+) ([^ ]+)$/ first, last = $1, $2 uu = User.where(:firstname => first, :lastname => last) - if uu.length == 1 + if uu.empty? + logger.warn "find_committer_user: found no user with name matching #{username}, ignoring" + elsif uu.length == 1 u = uu.first else logger.warn "find_committer_user: found more than one (#{uu.length}) results for user named #{username}, ignoring"