We need this change in order to get the local auth working properly.
Otherwise, pagure.lib.git.add_file_to_git relied on the given user object
having a .email which when using the local auth is not true and
therefore leads to a crash.
With this change, we retrieve the user object from the database and
therefore we can just use the default email set to the user there.
We need this change in order to get the
localauth working properly.Otherwise, pagure.lib.git.add_file_to_git relied on the given user object
having a
.emailwhich when using thelocalauth is not true andtherefore leads to a crash.
With this change, we retrieve the user object from the database and
therefore we can just use the default email set to the user there.