diff --git a/rhodecode/controllers/home.py b/rhodecode/controllers/home.py --- a/rhodecode/controllers/home.py +++ b/rhodecode/controllers/home.py @@ -24,7 +24,6 @@ # along with this program. If not, see . import logging -from operator import itemgetter from pylons import tmpl_context as c, request from paste.httpexceptions import HTTPBadRequest @@ -60,10 +59,10 @@ class HomeController(BaseController): return HTTPBadRequest() def branch_tag_switcher(self, repo_name): - c.rhodecode_db_repo = Repository.get_by_repo_name(c.repo_name) - c.rhodecode_repo = c.rhodecode_db_repo.scm_instance - return render('/switch_to_list.html') if request.is_xhr: + c.rhodecode_db_repo = Repository.get_by_repo_name(c.repo_name) + c.rhodecode_repo = c.rhodecode_db_repo.scm_instance return render('/switch_to_list.html') else: return HTTPBadRequest() +