backend fixes
This commit is contained in:
parent
36a55930f9
commit
aabb63f947
4 changed files with 11 additions and 6 deletions
|
|
@ -136,7 +136,8 @@ async def _latest_external_message(database, account_id: str, external_thread_id
|
|||
},
|
||||
{"$unwind": "$message"},
|
||||
]
|
||||
rows = [row async for row in database.mailbox_entries.aggregate(pipeline)]
|
||||
cursor = await database.mailbox_entries.aggregate(pipeline)
|
||||
rows = [row async for row in cursor]
|
||||
return rows[0]["message"] if rows else None
|
||||
|
||||
|
||||
|
|
@ -161,7 +162,8 @@ async def _latest_handoff_message(database, account_id: str, handoff_thread_id:
|
|||
},
|
||||
{"$unwind": "$message"},
|
||||
]
|
||||
rows = [row async for row in database.mailbox_entries.aggregate(pipeline)]
|
||||
cursor = await database.mailbox_entries.aggregate(pipeline)
|
||||
rows = [row async for row in cursor]
|
||||
return rows[0]["message"] if rows else None
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue