Fix utility update
This commit is contained in:
@@ -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:
|
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)
|
old = decorate(raw_old_value, key_type, optional)
|
||||||
|
|
||||||
with conn[name].cursor() as cur:
|
with conn[name].cursor() as cur:
|
||||||
|
|||||||
Reference in New Issue
Block a user