aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--fietsboek/views/browse.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/fietsboek/views/browse.py b/fietsboek/views/browse.py
index 83a58b3..678e207 100644
--- a/fietsboek/views/browse.py
+++ b/fietsboek/views/browse.py
@@ -36,18 +36,20 @@ class Stream(RawIOBase):
def _get_int(request, name):
try:
return int(request.params.get(name))
- except ValueError:
- raise HTTPBadRequest(f'Invalid integer in {name!r}')
+ except ValueError as exc:
+ raise HTTPBadRequest(f'Invalid integer in {name!r}') from exc
+
def _get_date(request, name):
try:
return datetime.date.fromisoformat(request.params.get(name))
- except ValueError:
- raise HTTPBadRequest(f'Invalid date in {name!r}')
+ except ValueError as exc:
+ raise HTTPBadRequest(f'Invalid date in {name!r}') from exc
class TrackFilters:
"""A filter that applies user-given filters to a track."""
+ # pylint: disable=fixme
# TODO: We should also do some of those in SQL, if possible.
def __init__(self, filters):