diff options
Diffstat (limited to 'pgcommitfest/commitfest/reports.py')
-rw-r--r-- | pgcommitfest/commitfest/reports.py | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/pgcommitfest/commitfest/reports.py b/pgcommitfest/commitfest/reports.py index f0d352e..4645856 100644 --- a/pgcommitfest/commitfest/reports.py +++ b/pgcommitfest/commitfest/reports.py @@ -8,12 +8,12 @@ from models import CommitFest @login_required def authorstats(request, cfid): - cf = get_object_or_404(CommitFest, pk=cfid) - if not request.user.is_staff: - raise Http404("Only CF Managers can do that.") + cf = get_object_or_404(CommitFest, pk=cfid) + if not request.user.is_staff: + raise Http404("Only CF Managers can do that.") - cursor = connection.cursor() - cursor.execute("""WITH patches(id,name) AS ( + cursor = connection.cursor() + cursor.execute("""WITH patches(id,name) AS ( SELECT p.id, name FROM commitfest_patch p INNER JOIN commitfest_patchoncommitfest poc ON poc.patch_id=p.id AND poc.commitfest_id=%(cid)s @@ -35,12 +35,12 @@ FROM (authors FULL OUTER JOIN reviewers ON authors.userid=reviewers.userid) INNER JOIN auth_user u ON u.id=COALESCE(authors.userid, reviewers.userid) ORDER BY last_name, first_name """, { - 'cid': cf.id, + 'cid': cf.id, }) - return render(request, 'report_authors.html', { - 'cf': cf, - 'report': cursor.fetchall(), - 'title': 'Author stats', - 'breadcrumbs': [{'title': cf.title, 'href': '/%s/' % cf.pk},], - }) + return render(request, 'report_authors.html', { + 'cf': cf, + 'report': cursor.fetchall(), + 'title': 'Author stats', + 'breadcrumbs': [{'title': cf.title, 'href': '/%s/' % cf.pk},], + }) |