Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
aljazerzen committed Oct 16, 2024
1 parent cc3f9b4 commit d43e663
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion edb/server/compiler/sql.py
Original file line number Diff line number Diff line change
Expand Up @@ -332,12 +332,14 @@ def lookup_bool_setting(
return None


def is_setting_truthy(val: str | int) -> bool:
def is_setting_truthy(val: str | int | float) -> bool:
if isinstance(val, str):
truthy = {'on', 'true', 'yes', '1'}
return val.lower() in truthy
elif isinstance(val, int):
return bool(val)
else:
return False


def compute_stmt_name(text: str, tx_state: dbstate.SQLTransactionState) -> str:
Expand Down

0 comments on commit d43e663

Please sign in to comment.