Commit f3733d8b authored by Michal Čihař's avatar Michal Čihař

Redirect to project checks if project filtering is enabled

Signed-off-by: default avatarMichal Čihař <michal@cihar.com>
parent a513e646
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
import urllib import urllib
from django.shortcuts import render from django.shortcuts import render, redirect
from django.utils.translation import ugettext as _ from django.utils.translation import ugettext as _
from django.http import Http404 from django.http import Http404
from django.db.models import Count from django.db.models import Count
...@@ -90,8 +90,11 @@ def show_check(request, name): ...@@ -90,8 +90,11 @@ def show_check(request, name):
) )
if 'project' in request.GET: if 'project' in request.GET:
checks = checks.filter(project__slug=request.GET['project']) return redirect(
url_params['project'] = request.GET['project'] 'show_check_project',
project=request.GET['project'],
name=name,
)
checks = checks.values('project__slug').annotate(count=Count('id')) checks = checks.values('project__slug').annotate(count=Count('id'))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment