fix, it does not need awaiture
This commit is contained in:
parent
1384bdfc5b
commit
d1dd0a3ee0
1 changed files with 1 additions and 5 deletions
|
|
@ -138,16 +138,12 @@ class AsyncSelectPagination(Pagination):
|
|||
self.error_out = error_out
|
||||
self.has_count = count
|
||||
|
||||
async def __await__(self):
|
||||
async def __aiter__(self):
|
||||
self.items = await self._query_items()
|
||||
if not self.items and self.page != 1 and self.error_out:
|
||||
raise self.error_out
|
||||
if self.has_count:
|
||||
self.total = await self._query_count()
|
||||
return self
|
||||
|
||||
async def __aiter__(self):
|
||||
await self
|
||||
for i in self.items:
|
||||
yield i
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue