From 52df929287d5899953261c051f30630ecb217e48 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=A1s=20Carvajal?= <66692533+ncarvajalc@users.noreply.github.com> Date: Mon, 13 Nov 2023 04:36:37 -0500 Subject: [PATCH] Fix multiple PK model containing boolean values (#670) Co-authored-by: Amin Alaee --- sqladmin/helpers.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sqladmin/helpers.py b/sqladmin/helpers.py index 072ecf74..4e681c96 100644 --- a/sqladmin/helpers.py +++ b/sqladmin/helpers.py @@ -225,7 +225,9 @@ def object_identifier_values(id_string: str, model: Any) -> tuple: values = [] pks = get_primary_keys(model) for pk, part in zip(pks, _object_identifier_parts(id_string, model)): - values.append(get_column_python_type(pk)(part)) + type_ = get_column_python_type(pk) + value = False if type_ is bool and part == "False" else type_(part) + values.append(value) return tuple(values)