Skip to content

Commit 233615b

Browse files
authored
fix: cast from db connections with non decoded output (#664)
cast from db connections with non decoded output fixes #2418
1 parent 8e39ee0 commit 233615b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

aredis_om/model/migrations/migrator.py

+3
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,9 @@ async def detect_migrations(self):
130130
continue
131131

132132
stored_hash = await conn.get(hash_key)
133+
if isinstance(stored_hash, bytes):
134+
stored_hash = stored_hash.decode('utf-8')
135+
133136
schema_out_of_date = current_hash != stored_hash
134137

135138
if schema_out_of_date:

0 commit comments

Comments
 (0)