Skip to content

Commit 690518f

Browse files
committed
Convert boolean strings to their values
1 parent a5ef5ce commit 690518f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

sonar/settings.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -207,11 +207,11 @@ def reload(self, data: types.ApiPayload) -> None:
207207
elif self.key == COMPONENT_VISIBILITY:
208208
self.value = data.get("visibility", None)
209209
elif self.key == "sonar.login.message":
210-
self.value: Optional[Any] = None
210+
self.value = None
211211
if "values" in data and isinstance(data["values"], list) and len(data["values"]) > 0:
212212
self.value = data["values"][0]
213213
else:
214-
self.value = next((data[key] for key in ("fieldValues", "values", "value") if key in data), None)
214+
self.value = util.convert_to_type(next((data[key] for key in ("fieldValues", "values", "value") if key in data), None))
215215
if not self.value and "defaultValue" in data:
216216
self.value = util.DEFAULT
217217
self.__reload_inheritance(data)

0 commit comments

Comments
 (0)