Merge "Remove unnecessary parameter in Zaqar"
This commit is contained in:
commit
b1cd63c41c
@ -63,7 +63,7 @@ class Resource(object):
|
||||
self._validate.queue_metadata_length(req.content_length)
|
||||
# Deserialize queue metadata
|
||||
document = wsgi_utils.deserialize(req.stream, req.content_length)
|
||||
metadata = wsgi_utils.sanitize(document, spec=None)
|
||||
metadata = wsgi_utils.sanitize(document)
|
||||
# Restrict setting any reserved queue attributes
|
||||
for key in metadata:
|
||||
if key.startswith('_'):
|
||||
|
@ -66,7 +66,7 @@ class ItemResource(object):
|
||||
if req.content_length:
|
||||
document = wsgi_utils.deserialize(req.stream,
|
||||
req.content_length)
|
||||
metadata = wsgi_utils.sanitize(document, spec=None)
|
||||
metadata = wsgi_utils.sanitize(document)
|
||||
# NOTE(Eva-i): reserved queue attributes is Zaqar's feature since
|
||||
# API v2. But we have to ensure the bad data will not come from
|
||||
# older APIs, so we validate metadata here.
|
||||
|
@ -81,7 +81,7 @@ class ItemResource(object):
|
||||
if req.content_length:
|
||||
document = wsgi_utils.deserialize(req.stream,
|
||||
req.content_length)
|
||||
metadata = wsgi_utils.sanitize(document, spec=None)
|
||||
metadata = wsgi_utils.sanitize(document)
|
||||
self._validate.queue_metadata_putting(metadata)
|
||||
except validation.ValidationFailed as ex:
|
||||
LOG.debug(ex)
|
||||
@ -156,8 +156,7 @@ class ItemResource(object):
|
||||
if req.content_length:
|
||||
try:
|
||||
changes = utils.read_json(req.stream, req.content_length)
|
||||
changes = wsgi_utils.sanitize(changes,
|
||||
spec=None, doctype=list)
|
||||
changes = wsgi_utils.sanitize(changes, doctype=list)
|
||||
except utils.MalformedJSON as ex:
|
||||
LOG.debug(ex)
|
||||
description = _(u'Request body could not be parsed.')
|
||||
|
Loading…
Reference in New Issue
Block a user