From 90e95fb83863db6ec8ccd4571ebd5725026725e2 Mon Sep 17 00:00:00 2001 From: ivanbelenky Date: Fri, 25 Oct 2024 01:53:05 -0300 Subject: [PATCH] cast from db connections with non decoded output --- aredis_om/model/migrations/migrator.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/aredis_om/model/migrations/migrator.py b/aredis_om/model/migrations/migrator.py index 27cac65e..eb3d1b0b 100644 --- a/aredis_om/model/migrations/migrator.py +++ b/aredis_om/model/migrations/migrator.py @@ -130,6 +130,9 @@ async def detect_migrations(self): continue stored_hash = await conn.get(hash_key) + if isinstance(stored_hash, bytes): + stored_hash = stored_hash.decode('utf-8') + schema_out_of_date = current_hash != stored_hash if schema_out_of_date: