Skip to content

Commit ab337df

Browse files
abrookinsclaude
andcommitted
Fix MyPy errors for _meta attribute access
Changed instance access of `self._meta.database` to class access using `self.__class__._meta.database` to resolve MyPy type checking issues. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
1 parent a35c6f0 commit ab337df

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

aredis_om/model/model.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2447,7 +2447,7 @@ async def save(
24472447
# Connection is bound to closed event loop, refresh it and retry
24482448
from ..connections import get_redis_connection
24492449

2450-
self._meta.database = get_redis_connection()
2450+
self.__class__._meta.database = get_redis_connection()
24512451
db = self._get_db(pipeline)
24522452
await db.hset(self.key(), mapping=document)
24532453
else:
@@ -2658,7 +2658,7 @@ async def save(
26582658
# Connection is bound to closed event loop, refresh it and retry
26592659
from ..connections import get_redis_connection
26602660

2661-
self._meta.database = get_redis_connection()
2661+
self.__class__._meta.database = get_redis_connection()
26622662
db = self._get_db(pipeline)
26632663
await db.json().set(self.key(), Path.root_path(), data)
26642664
else:

0 commit comments

Comments
 (0)