diff --git a/kallithea/lib/vcs/utils/helpers.py b/kallithea/lib/vcs/utils/helpers.py --- a/kallithea/lib/vcs/utils/helpers.py +++ b/kallithea/lib/vcs/utils/helpers.py @@ -51,7 +51,7 @@ def get_scm(path, search_up=False, expli raise VCSError('More than one [%s] scm found at given path %s' % (', '.join((x[0] for x in found_scms)), path)) - if len(found_scms) is 0: + if len(found_scms) == 0: raise VCSError('No scm found at given path %s' % path) return found_scms[0] diff --git a/kallithea/model/validators.py b/kallithea/model/validators.py --- a/kallithea/model/validators.py +++ b/kallithea/model/validators.py @@ -583,11 +583,11 @@ def ValidPerms(type_='repo'): # update permissions for k, v, t in perms_new: try: - if t is 'user': + if t == 'user': self.user_db = User.query() \ .filter(User.active == True) \ .filter(User.username == k).one() - if t is 'users_group': + if t == 'users_group': self.user_db = UserGroup.query() \ .filter(UserGroup.users_group_active == True) \ .filter(UserGroup.users_group_name == k).one()