Skip to content

Commit a8f1afe

Browse files
committed
adjust delete_many & expire methods
Signed-off-by: wiseaidev <[email protected]>
1 parent 2be329f commit a8f1afe

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
@@ -1149,7 +1149,7 @@ async def expire(
11491149
db = self._get_db(pipeline)
11501150

11511151
# TODO: Wrap any Redis response errors in a custom exception?
1152-
await db.expire(self.make_primary_key(self.key()), num_seconds)
1152+
await db.expire(self.key(), num_seconds)
11531153

11541154
@validator("pk", always=True, allow_reuse=True)
11551155
def validate_pk(cls, v):
@@ -1274,7 +1274,7 @@ async def delete_many(
12741274
db = cls._get_db(pipeline)
12751275

12761276
for chunk in ichunked(models, 100):
1277-
pks = [cls.make_primary_key(model.key()) for model in chunk]
1277+
pks = [model.key() for model in chunk]
12781278
await cls._delete(db, *pks)
12791279

12801280
return len(models)

0 commit comments

Comments
 (0)