Skip to content

Commit 8415180

Browse files
committed
Don't fail on incorrect statuses in URL
The comment said we should ignore the status if int() on it fails, but to do that we have to fail it before we actually add the WHERE clause. Thus, reorder the code to do so.
1 parent 1d248d2 commit 8415180

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pgcommitfest/commitfest/views.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,8 @@ def commitfest(request, cfid):
108108
whereparams = {}
109109
if request.GET.has_key('status') and request.GET['status'] != "-1":
110110
try:
111-
whereclauses.append("poc.status=%(status)s")
112111
whereparams['status'] = int(request.GET['status'])
112+
whereclauses.append("poc.status=%(status)s")
113113
except ValueError:
114114
# int() failed -- so just ignore this filter
115115
pass

0 commit comments

Comments
 (0)