Commit 589466f9 authored by Bruce Flynn's avatar Bruce Flynn

Fix error message formatting and fix station name regex

parent 3a1c2f2d
Pipeline #1532 passed with stage
in 1 minute and 51 seconds
......@@ -25,7 +25,7 @@ def get_form(schema, request):
try:
return schema().to_python(request.params)
except Invalid as err:
raise HTTPBadRequest('Invalid request parameters: {!r}'
raise HTTPBadRequest('Invalid request parameters: {}'
.format(err))
......@@ -34,7 +34,7 @@ class DataForm(Schema):
filter_extra_fields = False
type = OneOf(['rdr', 'q1h'], if_missing='q1h', if_empty='q1h')
stations = Regex(r'^[a-zA-Z_0-9() |\.]+$', not_empty=True)
stations = Regex(r'^[-a-zA-Z_0-9() |\.]+$', not_empty=True)
symbols = Regex(r'^[a-zA-Z_0-9|\.]+$', not_empty=True)
start = Regex(r'^\d\d\d\d-\d\d-\d\dT\d\d:\d\d:\d\dZ$', not_empty=True)
end = Regex(r'^\d\d\d\d-\d\d-\d\dT\d\d:\d\d:\d\dZ$', not_empty=True)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment