Merge pull request #1164 from motorina0/fix_list_of_string

fix: do not apply `list()` to `str` value
This commit is contained in:
Vlad Stan 2022-12-01 08:52:24 +02:00 committed by GitHub
commit b31dd4506c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -86,7 +86,8 @@ class Connection(Compat):
return raw_html
# tuple to list and back to tuple
values = tuple([cleanhtml(l) for l in list(values)])
value_list = [values] if isinstance(values, str) else list(values)
values = tuple([cleanhtml(l) for l in value_list])
return values
async def fetchall(self, query: str, values: tuple = ()) -> list: