Skip to content

Commit 6deef36

Browse files
committed
removing unnecessary single_page parameter
1 parent acef1a5 commit 6deef36

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

aredis_om/model/model.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -422,7 +422,6 @@ def __init__(
422422
page_size: int = DEFAULT_PAGE_SIZE,
423423
sort_fields: Optional[List[str]] = None,
424424
nocontent: bool = False,
425-
single_page: bool = False,
426425
):
427426
if not has_redisearch(model.db()):
428427
raise RedisModelError(
@@ -438,7 +437,6 @@ def __init__(
438437
self.limit = limit or (self.knn.k if self.knn else DEFAULT_PAGE_SIZE)
439438
self.page_size = page_size
440439
self.nocontent = nocontent
441-
self.single_page = single_page
442440

443441
if sort_fields:
444442
self.sort_fields = self.validate_sort_fields(sort_fields)
@@ -953,7 +951,7 @@ async def all(self, batch_size=DEFAULT_PAGE_SIZE):
953951
return await self.execute()
954952

955953
async def page(self, offset=0, limit=10):
956-
return await self.copy(offset=offset, limit=limit, single_page=True).execute()
954+
return await self.copy(offset=offset, limit=limit).execute(exhaust_results=False)
957955

958956
def sort_by(self, *fields: str):
959957
if not fields:

0 commit comments

Comments
 (0)