# HG changeset patch # User Marcin Kuzminski # Date 2017-01-11 13:02:34 # Node ID 17b0bbae0509d791c4b61c25646349145d58adf8 # Parent d188249b7bc6e84175b19a2cadf6a6219f76be8f comments: skip already deleted comments and make sure we don't raise unnecessary errors. diff --git a/rhodecode/controllers/changeset.py b/rhodecode/controllers/changeset.py --- a/rhodecode/controllers/changeset.py +++ b/rhodecode/controllers/changeset.py @@ -428,6 +428,11 @@ class ChangesetController(BaseRepoContro @jsonify def delete_comment(self, repo_name, comment_id): comment = ChangesetComment.get(comment_id) + if not comment: + log.debug('Comment with id:%s not found, skipping', comment_id) + # comment already deleted in another call probably + return True + owner = (comment.author.user_id == c.rhodecode_user.user_id) is_repo_admin = h.HasRepoPermissionAny('repository.admin')(c.repo_name) if h.HasPermissionAny('hg.admin')() or is_repo_admin or owner: