diff options
author | Magnus Hagander | 2018-10-29 11:48:35 +0000 |
---|---|---|
committer | Magnus Hagander | 2018-10-29 11:48:35 +0000 |
commit | 8761e5790820aa51eee7156505fe472c20ca8a5a (patch) | |
tree | 295ade80c9ce186306ef0957fffd03890fcffedb /pgcommitfest/commitfest/views.py | |
parent | 84151808c02beacac4395c506189ee743bc9f260 (diff) |
Also don't fail on invalid reviewers or authors
Same fix as the previous one for status, but applies to the other two
filter-by-dropdown fields.
Diffstat (limited to 'pgcommitfest/commitfest/views.py')
-rw-r--r-- | pgcommitfest/commitfest/views.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pgcommitfest/commitfest/views.py b/pgcommitfest/commitfest/views.py index cc94950..8ead84d 100644 --- a/pgcommitfest/commitfest/views.py +++ b/pgcommitfest/commitfest/views.py @@ -125,8 +125,8 @@ def commitfest(request, cfid): whereparams['self'] = request.user.id else: try: - whereclauses.append("EXISTS (SELECT 1 FROM commitfest_patch_authors cpa WHERE cpa.patch_id=p.id AND cpa.user_id=%(author)s)") whereparams['author'] = int(request.GET['author']) + whereclauses.append("EXISTS (SELECT 1 FROM commitfest_patch_authors cpa WHERE cpa.patch_id=p.id AND cpa.user_id=%(author)s)") except ValueError: # int() failed -- so just ignore this filter pass @@ -142,8 +142,8 @@ def commitfest(request, cfid): whereparams['self'] = request.user.id else: try: - whereclauses.append("EXISTS (SELECT 1 FROM commitfest_patch_reviewers cpr WHERE cpr.patch_id=p.id AND cpr.user_id=%(reviewer)s)") whereparams['reviewer'] = int(request.GET['reviewer']) + whereclauses.append("EXISTS (SELECT 1 FROM commitfest_patch_reviewers cpr WHERE cpr.patch_id=p.id AND cpr.user_id=%(reviewer)s)") except ValueError: # int() failed -- so just ignore this filter pass |