Skip to content

Commit

Permalink
log: be more robust against malformed input (#1127)
Browse files Browse the repository at this point in the history
Refs #1113
  • Loading branch information
xrmx authored and mistercrunch committed Sep 19, 2016
1 parent 8c619e8 commit 8081080
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion caravel/models.py
Expand Up @@ -1734,7 +1734,10 @@ def wrapper(*args, **kwargs):
d = request.args.to_dict()
d.update(kwargs)
slice_id = d.get('slice_id', 0)
slice_id = int(slice_id) if slice_id else 0
try:
slice_id = int(slice_id) if slice_id else 0
except ValueError:
slice_id = 0
params = ""
try:
params = json.dumps(d)
Expand Down

0 comments on commit 8081080

Please sign in to comment.