Fix utility update

This commit is contained in:
wqy
2022-09-17 10:39:53 +08:00
parent ab11d2d134
commit 01225c309c

View File

@@ -19,6 +19,7 @@ def decorate(value: str | None, type: str, optional: bool) -> str:
def update(name: str, type: str, table: str, id_key: str, id_value: str, key: str, key_type: str, raw_old_value: str, value: str, optional: bool = False) -> ChangeSet:
value = f"'{value}'" if key_type is 'str' else value
old = decorate(raw_old_value, key_type, optional)
with conn[name].cursor() as cur: