mirror of
https://github.com/camptocamp/odoo-cloud-platform.git
synced 2026-06-23 18:04:34 +00:00
[MIG] session_redis: Migration to 18.0
This commit is contained in:
@@ -15,7 +15,9 @@ _MAP = {
|
||||
|
||||
|
||||
def strtobool(value):
|
||||
try:
|
||||
return _MAP[str(value).lower()]
|
||||
except KeyError as error:
|
||||
raise ValueError(f'"{value}" is not a valid bool value') from error
|
||||
result = _MAP.get(str(value).strip().lower())
|
||||
|
||||
if result is None:
|
||||
raise ValueError(f"Invalid boolean value: {repr(value)}")
|
||||
|
||||
return result
|
||||
|
||||
Reference in New Issue
Block a user