summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Forney <mforney@mforney.org>2019-04-26 18:56:49 -0700
committerDrew DeVault <sir@cmpwn.com>2019-04-27 13:54:46 -0400
commit1c7eb14916983dac2476529536c5fcb32a48df42 (patch)
tree795af19dabd7926f323d2b5555dc50e6d67de8e5
parenta67f8accece19adfaf6777c09e37df4734f669bb (diff)
Prevent crash in post-update hook when ref is deleted
-rw-r--r--gitsrht/submit.py2
1 files changed, 1 insertions, 1 deletions
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)