Skip to content

Commit 8761e57

Browse files
committed
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.
1 parent 8415180 commit 8761e57

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pgcommitfest/commitfest/views.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,8 @@ def commitfest(request, cfid):
125125
whereparams['self'] = request.user.id
126126
else:
127127
try:
128-
whereclauses.append("EXISTS (SELECT 1 FROM commitfest_patch_authors cpa WHERE cpa.patch_id=p.id AND cpa.user_id=%(author)s)")
129128
whereparams['author'] = int(request.GET['author'])
129+
whereclauses.append("EXISTS (SELECT 1 FROM commitfest_patch_authors cpa WHERE cpa.patch_id=p.id AND cpa.user_id=%(author)s)")
130130
except ValueError:
131131
# int() failed -- so just ignore this filter
132132
pass
@@ -142,8 +142,8 @@ def commitfest(request, cfid):
142142
whereparams['self'] = request.user.id
143143
else:
144144
try:
145-
whereclauses.append("EXISTS (SELECT 1 FROM commitfest_patch_reviewers cpr WHERE cpr.patch_id=p.id AND cpr.user_id=%(reviewer)s)")
146145
whereparams['reviewer'] = int(request.GET['reviewer'])
146+
whereclauses.append("EXISTS (SELECT 1 FROM commitfest_patch_reviewers cpr WHERE cpr.patch_id=p.id AND cpr.user_id=%(reviewer)s)")
147147
except ValueError:
148148
# int() failed -- so just ignore this filter
149149
pass

0 commit comments

Comments
 (0)