Merge "Use util.validate_query_params in list_traits"

This commit is contained in:
Zuul 2018-02-01 21:26:22 +00:00 committed by Gerrit Code Review
commit f177998841
1 changed files with 1 additions and 7 deletions

View File

@ -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'])