@@ -121,9 +121,13 @@ def __get_property(self, p):
121121 if self .__properties :
122122 v = self .__properties .get_property (p )
123123
124- if not v :
124+ if v is None :
125125 if "properties" in self .__config_json and p in self .__config_json ["properties" ]:
126126 v = self .__config_json ["properties" ][p ]
127+
128+ if v is not None and type (v ) is bool :
129+ v = "true" if v else "false"
130+
127131 return v
128132
129133 def __reset (self ):
@@ -184,7 +188,7 @@ def get_value(self, entity, entity_field):
184188 if f ["value" ]:
185189 p = f ["value" ]
186190 value = self .__get_property (p )
187- if not value :
191+ if value is None :
188192 raise ValueError ("Missing configured property '%s'" % (p ))
189193 elif "value" == f ["source" ]:
190194 value = f ["value" ]
@@ -198,7 +202,7 @@ def get_value(self, entity, entity_field):
198202 if f ["value" ]:
199203 c = f ["value" ]
200204 value = self .__secrets .get_secret (c )
201- if not value :
205+ if value is None :
202206 raise ValueError ("Missing configured secret '%s'" % (c ))
203207 else :
204208 raise ValueError ("Invalid source property '%s'" % f ["source" ])
@@ -336,9 +340,13 @@ def __get_property(self, p):
336340 if self .__properties :
337341 v = self .__properties .get_property (p )
338342
339- if not v :
343+ if v is None :
340344 if "properties" in self .__config_json and p in self .__config_json ["properties" ]:
341345 v = self .__config_json ["properties" ][p ]
346+
347+ if v is not None and type (v ) is bool :
348+ v = "true" if v else "false"
349+
342350 return v
343351
344352 def set_cert_infos (self , cert_infos ):
@@ -397,7 +405,7 @@ def get_certificates(self):
397405 if "property" == cert ["source" ]:
398406 p = cert ["password" ]
399407 password = self .__get_property (p )
400- if not password :
408+ if password is None :
401409 raise ValueError ("Missing configured property '%s' for alias '%s'!" % (p , alias ))
402410 elif "password" == cert ["source" ]:
403411 password = cert ["password" ]
@@ -410,7 +418,7 @@ def get_certificates(self):
410418
411419 c = cert ["password" ]
412420 password = self .__secrets .get_secret (c )
413- if not password :
421+ if password is None :
414422 raise ValueError ("Missing configured secret '%s' for alias '%s'!" % (c , alias ))
415423 else :
416424 raise ValueError ("Invalid password source '%s' for alias '%s'!" % (cert ["source" ], alias ))
0 commit comments