Commit 2cd419b2 authored by Michal Čihař's avatar Michal Čihař

Missing condition

parent 02991be5
......@@ -82,7 +82,7 @@ def show_check_project(request, name, project):
units = Unit.objects.none()
for lang in langs:
checks = Check.objects.filter(check = name, project = prj, language = lang).values_list('checksum', flat = True).distinct()
res = Unit.objects.filter(checksum__in = checks, translation__language = lang).values('translation__subproject__slug', 'translation__subproject__project__slug').annotate(count = Count('id'))
res = Unit.objects.filter(checksum__in = checks, translation__language = lang, translation__subproject__project = prj).values('translation__subproject__slug', 'translation__subproject__project__slug').annotate(count = Count('id'))
units |= res
return render_to_response('check_project.html', RequestContext(request, {
'checks': units,
......
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