Fixed bool error
All checks were successful
/ backend-pylint (push) Successful in 23s

This commit is contained in:
Firq 2025-02-04 15:41:45 +00:00
parent 1d3e7557b1
commit 662d5dd3d6

View file

@ -16,4 +16,4 @@ def generate_error(status: int, message: Optional[str]=None, additional_data: Op
return obj, status
def convert_to_bool(val: str) -> bool:
return bool(val) if str(val).lower() not in ("null", "none") else False
return str(val).lower() in ("1", "true")