# HG changeset patch # User Marcin Kuzminski # Date 2017-06-05 20:23:30 # Node ID fa40b1850f15eba2065cf5591dff3bc9a5305ea2 # Parent a6742a8be2c4e5425d3e23a30e4ffe973b48e4dd predicates: skip route matching for vcs type calls. diff --git a/rhodecode/apps/_base/__init__.py b/rhodecode/apps/_base/__init__.py --- a/rhodecode/apps/_base/__init__.py +++ b/rhodecode/apps/_base/__init__.py @@ -257,6 +257,11 @@ class RepoRoutePredicate(object): phash = text def __call__(self, info, request): + + if hasattr(request, 'vcs_call'): + # skip vcs calls + return + repo_name = info['match']['repo_name'] repo_model = repo.RepoModel() by_name_match = repo_model.get_by_repo_name(repo_name, cache=True) @@ -284,6 +289,9 @@ class RepoTypeRoutePredicate(object): phash = text def __call__(self, info, request): + if hasattr(request, 'vcs_call'): + # skip vcs calls + return rhodecode_db_repo = request.db_repo @@ -316,6 +324,10 @@ class RepoGroupRoutePredicate(object): phash = text def __call__(self, info, request): + if hasattr(request, 'vcs_call'): + # skip vcs calls + return + repo_group_name = info['match']['repo_group_name'] repo_group_model = repo_group.RepoGroupModel() by_name_match = repo_group_model.get_by_group_name(