Mercurial > kallithea
changeset 5539:87285c5007fb
comments: check for None instead of boolean checks
author | Mads Kiilerich <madski@unity3d.com> |
---|---|
date | Thu, 08 Oct 2015 23:27:41 +0200 |
parents | 35943bda15b8 |
children | 786640c577f3 |
files | kallithea/model/comment.py |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/kallithea/model/comment.py Thu Oct 08 23:27:41 2015 +0200 +++ b/kallithea/model/comment.py Thu Oct 08 23:27:41 2015 +0200 @@ -266,10 +266,10 @@ 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: