mirror of
https://github.com/django/django.git
synced 2025-11-20 11:36:04 +00:00
Update django/db/backends/utils.py
Co-authored-by: Mykhailo Havelia <Arfey17.mg@gmail.com>
This commit is contained in:
parent
5d900958af
commit
08ba324d1b
1 changed files with 4 additions and 2 deletions
|
|
@ -200,8 +200,10 @@ class AsyncCursorWrapper(CursorWrapper):
|
|||
except self.db.Database.Error:
|
||||
pass
|
||||
|
||||
def __aiter__(self):
|
||||
return self.cursor.__aiter__()
|
||||
async def __aiter__(self):
|
||||
with self.db.wrap_database_errors:
|
||||
async for item in self.cursor:
|
||||
yield item
|
||||
|
||||
|
||||
class CursorDebugWrapper(CursorWrapper):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue