projects
/
pgcommitfest2.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1d248d2
)
Don't fail on incorrect statuses in URL
author
Magnus Hagander
<magnus@hagander.net>
Sun, 16 Sep 2018 21:47:52 +0000
(23:47 +0200)
committer
Magnus Hagander
<magnus@hagander.net>
Sun, 16 Sep 2018 21:49:51 +0000
(23:49 +0200)
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.
pgcommitfest/commitfest/views.py
patch
|
blob
|
blame
|
history
diff --git
a/pgcommitfest/commitfest/views.py
b/pgcommitfest/commitfest/views.py
index 3ee60e3c8969d9169b0428e308ae0d5511a8d252..cc94950571a8d9269b15ad94c0731e0024e4596d 100644
(file)
--- a/
pgcommitfest/commitfest/views.py
+++ b/
pgcommitfest/commitfest/views.py
@@
-108,8
+108,8
@@
def commitfest(request, cfid):
whereparams = {}
if request.GET.has_key('status') and request.GET['status'] != "-1":
try:
- whereclauses.append("poc.status=%(status)s")
whereparams['status'] = int(request.GET['status'])
+ whereclauses.append("poc.status=%(status)s")
except ValueError:
# int() failed -- so just ignore this filter
pass