From 8c0a54311978cbe4ba67898c12633e1e29da561d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Nowak?= <luke@nexedi.com> Date: Wed, 2 May 2012 16:17:07 +0200 Subject: [PATCH] Check that slave rendered to boolean. --- master/product/Vifib/Tool/VifibRestApiV1Tool.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/master/product/Vifib/Tool/VifibRestApiV1Tool.py b/master/product/Vifib/Tool/VifibRestApiV1Tool.py index 7b34fa267..3394cbfdd 100644 --- a/master/product/Vifib/Tool/VifibRestApiV1Tool.py +++ b/master/product/Vifib/Tool/VifibRestApiV1Tool.py @@ -106,6 +106,9 @@ class InstancePublisher(GenericPublisher): request_dict = {} error_dict = {} + if 'slave' in jbody: + if not isinstance(jbody['slave'], bool): + error_dict['slave'] = 'Not boolean.' for k_j, k_i in ( ('software_release', 'software_release'), ('title', 'software_title'), -- 2.30.9