# HG changeset patch # User Mads Kiilerich # Date 2015-10-08 23:27:41 # Node ID 87285c5007fbf014f7e8b391d8e3af66aa1e6d84 # Parent 35943bda15b85c96f21c4342a28391b077cc8902 comments: check for None instead of boolean checks diff --git a/kallithea/model/comment.py b/kallithea/model/comment.py --- a/kallithea/model/comment.py +++ b/kallithea/model/comment.py @@ -266,10 +266,10 @@ class ChangesetCommentsModel(BaseModel): q = q.filter(ChangesetComment.line_no == None)\ .filter(ChangesetComment.f_path == None) - if revision: + if revision is not None: q = q.filter(ChangesetComment.revision == revision)\ .filter(ChangesetComment.repo_id == repo_id) - elif pull_request: + elif pull_request is not None: pull_request = self.__get_pull_request(pull_request) q = q.filter(ChangesetComment.pull_request == pull_request) else: