Changeset - 1ae14a2ceba0
[Not reviewed]
default
0 1 0
Mads Kiilerich - 10 years ago 2015-07-20 15:11:42
madski@unity3d.com
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.
1 file changed with 2 insertions and 1 deletions:
0 comments (0 inline, 0 general)
kallithea/controllers/changeset.py
Show inline comments
 
@@ -238,13 +238,14 @@ class ChangesetController(BaseRepoContro
 
                                              revision=changeset.raw_id))
 

	
 
                # Status change comments - mostly from pull requests
 
                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,
 
                                                 revision=changeset.raw_id)
 
                c.inline_comments.extend(inlines)
 

	
0 comments (0 inline, 0 general)