From 01225c309c06431a0af1f81c12887b688798392e Mon Sep 17 00:00:00 2001 From: wqy Date: Sat, 17 Sep 2022 10:39:53 +0800 Subject: [PATCH] Fix utility update --- api/utility.py | 1 + 1 file changed, 1 insertion(+) diff --git a/api/utility.py b/api/utility.py index 4586cad..379a2bc 100644 --- a/api/utility.py +++ b/api/utility.py @@ -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: