From 4c386fbc3ff6ed9437cfc18d9023f0d6c73575c7 Mon Sep 17 00:00:00 2001 From: Lubomír Sedlář Date: May 04 2018 13:11:48 +0000 Subject: Fix stats for commits without author Fixes: #3196 --- diff --git a/pagure/lib/tasks.py b/pagure/lib/tasks.py index ec39c2c..351af37 100644 --- a/pagure/lib/tasks.py +++ b/pagure/lib/tasks.py @@ -853,6 +853,9 @@ def commits_author_stats(self, session, repopath): stats[(author, email)] += 1 for (name, email), val in stats.items(): + if not email: + # Author email is missing in the git commit. + continue # For each recorded user info, check if we know the e-mail address of # the user. user = pagure.lib.search_user(session, email=email)