#3196 Authors stat view broken for Pungi
Closed: Fixed 5 years ago Opened 5 years ago by lsedlar.

Go to the authors stat page of Pungi (https://pagure.io/pungi/stats#authors). It displays Since Invalid Date there has been ' commits found in this repo, from i contributors.

In the browser console I see that the task returned {"results": "'list' object has no attribute 'default_email'"}.


There is some strange author information in that repo, but it is not enough to replicate locally.

Can there be a user with empty e-mail address? That could cause this, but so far I could not create that in my local instance.

Can there be a user with empty e-mail address? That could cause this, but so far I could not create that in my local instance.

Git will allow it and pagure will choke on it and that would explain the error you see in the console. Basically, it searches an user with an email address None which will return all users in the DB and thus when trying to access the default_email, it'll crash

That's not what I'm seeing in my local instance. Even if there is no e-mail in the commit, in python I see empty string, which returns no users.

ok I also cannot reproduce it locally which makes me think it may be a difference of behavior in the pygit2 version

There is a newer libgit2/pygit2 incoming in epel7 which may thus fix that issue. I don't have my centos7 dev box at hand at the moment so I can't dig into it now :(

Would be nice to fix it outside of the pygit2 upgrade though.

PR #3198 might fix it by not doing anything when encountering empty email.

Login to comment on this ticket.

Metadata
Related Pull Requests
  • #3198 Merged 5 years ago