diff --git a/torba/torba/client/basedatabase.py b/torba/torba/client/basedatabase.py index 14ae3685f..9355970b2 100644 --- a/torba/torba/client/basedatabase.py +++ b/torba/torba/client/basedatabase.py @@ -199,8 +199,8 @@ def query(select, **constraints) -> Tuple[str, Dict[str, Any]]: def interpolate(sql, values): for k in sorted(values.keys(), reverse=True): value = values[k] - if isinstance(value, memoryview): - value = f"X'{hexlify(bytes(value)).decode()}'" + if isinstance(value, bytes): + value = f"X'{hexlify(value).decode()}'" elif isinstance(value, str): value = f"'{value}'" else: