Skip to content

Commit 89491a8

Browse files
committed
feat: improve get history question list
1 parent 6764937 commit 89491a8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

backend/apps/chat/curd/chat.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -701,7 +701,7 @@ def get_old_questions(session: SessionDep, datasource: int):
701701
if not datasource:
702702
return records
703703
stmt = select(ChatRecord.question).where(
704-
and_(ChatRecord.datasource == datasource, ChatRecord.question.isnot(None))).order_by(
704+
and_(ChatRecord.datasource == datasource, ChatRecord.question.isnot(None), ChatRecord.error.is_(None))).order_by(
705705
ChatRecord.create_time.desc()).limit(20)
706706
result = session.execute(stmt)
707707
for r in result:

0 commit comments

Comments
 (0)