diff options
author | Michael Forney <mforney@mforney.org> | 2019-04-26 18:56:49 -0700 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2019-04-27 13:54:46 -0400 |
commit | 1c7eb14916983dac2476529536c5fcb32a48df42 (patch) | |
tree | 795af19dabd7926f323d2b5555dc50e6d67de8e5 | |
parent | a67f8accece19adfaf6777c09e37df4734f669bb (diff) |
Prevent crash in post-update hook when ref is deleted
-rw-r--r-- | gitsrht/submit.py | 2 |
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) |