summaryrefslogtreecommitdiff
path: root/wsme/rest/xml.py
diff options
context:
space:
mode:
authorJulien Danjou <julien@danjou.info>2013-10-09 17:07:40 +0200
committerJulien Danjou <julien@danjou.info>2013-10-09 17:14:02 +0200
commitb67405d486a0d09abde6423818734bbb5a978bc4 (patch)
treec5f40f7e39e6f460595f191e19cfc94130ff8461 /wsme/rest/xml.py
parente3b324e1e45f363d4702d414c04adf7b4f3ed3a9 (diff)
downloadwsme-b67405d486a0d09abde6423818734bbb5a978bc4.tar.gz
Validate body when using Pecan
This makes sure that when the body is decoded we run the validation process on it. Fixes-Bug: #1220678 Change-Id: I765a6ce8c8097ef0e0a734804242e9fcee4ffbcf
Diffstat (limited to 'wsme/rest/xml.py')
-rw-r--r--wsme/rest/xml.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/wsme/rest/xml.py b/wsme/rest/xml.py
index 1ebc3d5..9a836c3 100644
--- a/wsme/rest/xml.py
+++ b/wsme/rest/xml.py
@@ -105,7 +105,7 @@ def fromxml(datatype, element):
elif attrdef.mandatory:
raise InvalidInput(attrdef.name, None,
"Mandatory field missing.")
- return obj
+ return wsme.types.validate_value(datatype, obj)
if datatype is wsme.types.bytes:
return element.text.encode('ascii')
return datatype(element.text)