fix: 修复审计时超管看不到会话内容的bug

This commit is contained in:
GuoQing Zhang
2024-08-15 10:58:39 +08:00
parent c12ce9817b
commit 16aa7b4269
+1 -2
View File
@@ -125,8 +125,7 @@ def get_chatmessage(*,
if not chat_id or not flow_id:
return {'code': 500, 'message': 'chat_id 和 flow_id 必传参数'}
where = select(ChatMessage).where(ChatMessage.flow_id == flow_id,
ChatMessage.chat_id == chat_id,
ChatMessage.user_id == login_user.user_id)
ChatMessage.chat_id == chat_id)
if id:
where = where.where(ChatMessage.id < int(id))
with session_getter() as session: