Use util.validate_query_params in list_traits
This patch try to use util.validate_query_params in list_traits. trivial fix Change-Id: Ifeaf610200fe9dd825612b89cbf526b218af93a1
This commit is contained in:
parent
6167a89df7
commit
7f3c2f5fd4
|
@ -148,13 +148,7 @@ def list_traits(req):
|
|||
want_version = req.environ[microversion.MICROVERSION_ENVIRON]
|
||||
filters = {}
|
||||
|
||||
try:
|
||||
jsonschema.validate(dict(req.GET), schema.LIST_TRAIT_SCHEMA,
|
||||
format_checker=jsonschema.FormatChecker())
|
||||
except jsonschema.ValidationError as exc:
|
||||
raise webob.exc.HTTPBadRequest(
|
||||
_('Invalid query string parameters: %(exc)s') %
|
||||
{'exc': exc})
|
||||
util.validate_query_params(req, schema.LIST_TRAIT_SCHEMA)
|
||||
|
||||
if 'name' in req.GET:
|
||||
filters = _normalize_traits_qs_param(req.GET['name'])
|
||||
|
|
Loading…
Reference in New Issue