From c87656640e56caff7baf2e5ed8c1b7b6e701670f Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Dec 06 2020 08:37:13 +0000 Subject: Ensure the author in git commit notifications follow the expected format When an author pushing to pagure isn't found in the DB, we should still provide it using the expected format. Signed-off-by: Pierre-Yves Chibon --- diff --git a/pagure/hooks/default.py b/pagure/hooks/default.py index 9c56032..7474d43 100644 --- a/pagure/hooks/default.py +++ b/pagure/hooks/default.py @@ -178,6 +178,13 @@ def send_notifications( for author in auths: if not isinstance(author, six.string_types): author = author.to_json(public=True) + else: + author = { + "fullname": author, + "email": None, + "name": None, + "url_path": None, + } authors.append(author) if revs: