From 1c7eb14916983dac2476529536c5fcb32a48df42 Mon Sep 17 00:00:00 2001 From: Michael Forney Date: Fri, 26 Apr 2019 18:56:49 -0700 Subject: Prevent crash in post-update hook when ref is deleted --- gitsrht/submit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gitsrht/submit.py b/gitsrht/submit.py index 11944b0..6732d99 100644 --- a/gitsrht/submit.py +++ b/gitsrht/submit.py @@ -129,7 +129,7 @@ def do_post_update(repo, refs): update.update({ "name": ref, "old": commit_to_dict(old) if old else None, - "new": commit_to_dict(new), + "new": commit_to_dict(new) if new else None, }) payload["refs"].append(update) -- cgit v1.2.3