comparison rhodecode/controllers/admin/repos_groups.py @ 3625:260a7a01b054 beta

follow Python conventions for boolean values True and False might be singletons and the "default" values for "boolean" expressions, but "all" values in Python has a boolean value and should be evaluated as such. Checking with 'is True' and 'is False' is thus confusing, error prone and unnessarily complex. If we anywhere rely and nullable boolean fields from the database layer and don't want the null value to be treated as False then we should check explicitly for null with 'is None'.
author Mads Kiilerich <madski@unity3d.com>
date Thu, 28 Mar 2013 01:10:45 +0100
parents a8f2d78d14ea
children 4c78a0855a17
comparison
equal deleted inserted replaced
3624:4dddb7ee8865 3625:260a7a01b054
346 346
347 groups = RepoGroup.query().order_by(RepoGroup.group_name)\ 347 groups = RepoGroup.query().order_by(RepoGroup.group_name)\
348 .filter(RepoGroup.group_parent_id == c.group.group_id).all() 348 .filter(RepoGroup.group_parent_id == c.group.group_id).all()
349 c.groups = self.scm_model.get_repos_groups(groups) 349 c.groups = self.scm_model.get_repos_groups(groups)
350 350
351 if c.visual.lightweight_dashboard is False: 351 if not c.visual.lightweight_dashboard:
352 c.repos_list = self.scm_model.get_repos(all_repos=gr_filter) 352 c.repos_list = self.scm_model.get_repos(all_repos=gr_filter)
353 ## lightweight version of dashboard 353 ## lightweight version of dashboard
354 else: 354 else:
355 c.repos_list = Repository.query()\ 355 c.repos_list = Repository.query()\
356 .filter(Repository.group_id == c.group.group_id)\ 356 .filter(Repository.group_id == c.group.group_id)\