Mercurial > kallithea
changeset 4301:5095f484f74c
changeset: don't crash if removed comment already has been removed
author | Mads Kiilerich <madski@unity3d.com> |
---|---|
date | Tue, 10 Dec 2013 19:30:37 +0100 |
parents | f322a2326019 |
children | 916be70ff883 |
files | kallithea/controllers/changeset.py |
diffstat | 1 files changed, 2 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/kallithea/controllers/changeset.py Fri Jun 28 11:50:13 2013 +0200 +++ b/kallithea/controllers/changeset.py Tue Dec 10 19:30:37 2013 +0100 @@ -428,6 +428,8 @@ @jsonify def delete_comment(self, repo_name, comment_id): co = ChangesetComment.get(comment_id) + if not co: + raise HTTPBadRequest() owner = co.author.user_id == c.authuser.user_id repo_admin = h.HasRepoPermissionAny('repository.admin') if h.HasPermissionAny('hg.admin')() or repo_admin or owner: