Skip to content

Commit 3d14b22

Browse files
committed
fix: fix for case when value is none
1 parent 45cc2e1 commit 3d14b22

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

pgvector/sqlalchemy/bit.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,10 @@ def process(value):
2626

2727
def result_processor(self, dialect, coltype):
2828
def process(value):
29-
if value and isinstance(dialect, PGDialect_asyncpg):
30-
return value.as_string()
29+
if value is None: return None
30+
else:
31+
if isinstance(dialect, PGDialect_asyncpg):
32+
return value.as_string()
3133
return Bit._from_db(value).to_text()
3234
return process
3335

0 commit comments

Comments
 (0)