# HG changeset patch # User Mads Kiilerich # Date 2015-07-20 15:11:42 # Node ID 1ae14a2ceba0a108ce11126871c31ff4a310003b # Parent 39dfc5fc0ec266e3da8f80396f41307473fb2fc3 changeset: make code more stable against unexpected comments Avoid passing None to the template in comments. This makes the code more correct and fixes a crash seen while hacking, probably never seen in the wild. diff --git a/kallithea/controllers/changeset.py b/kallithea/controllers/changeset.py --- a/kallithea/controllers/changeset.py +++ b/kallithea/controllers/changeset.py @@ -241,7 +241,8 @@ class ChangesetController(BaseRepoContro comments.update((st.changeset_comment_id, st.comment) for st in ChangesetStatusModel() .get_statuses(c.db_repo.repo_id, - changeset.raw_id, with_revisions=True)) + changeset.raw_id, with_revisions=True) + if st.changeset_comment_id is not None) inlines = ChangesetCommentsModel()\ .get_inline_comments(c.db_repo.repo_id,