mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-06-14 20:55:15 +02:00
fix: eagerly load message relationship in get_user_mentions
This commit is contained in:
parent
985f50b683
commit
13135ec51b
1 changed files with 1 additions and 0 deletions
|
|
@ -589,6 +589,7 @@ async def get_user_mentions(
|
|||
.join(NewChatThread, NewChatMessage.thread_id == NewChatThread.id)
|
||||
.options(
|
||||
selectinload(ChatCommentMention.comment).selectinload(ChatComment.author),
|
||||
selectinload(ChatCommentMention.comment).selectinload(ChatComment.message),
|
||||
)
|
||||
.filter(ChatCommentMention.mentioned_user_id == user.id)
|
||||
.order_by(ChatCommentMention.created_at.desc())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue