Skip to content

Commit fcac01d

Browse files
committed
fix xnuinside#65 booleans are not capitalized
1 parent 3f7b067 commit fcac01d

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

omymodels/from_ddl.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,9 +172,17 @@ def prepare_data(item: Dict) -> Dict:
172172
item[key] = clean_value(value)
173173
elif isinstance(value, dict):
174174
value = prepare_data(value)
175+
else:
176+
item[key] = format_to_py_var(value)
175177
return item
176178

177179

180+
def format_to_py_var(value: str) -> str:
181+
if value in ["false", "true"]:
182+
return value.capitalize()
183+
return value
184+
185+
178186
def clean_value(string: str) -> str:
179187
string = string.replace('"', "")
180188
if string.startswith("[") and string.endswith("]"):

0 commit comments

Comments
 (0)