pull/22445/merge
ZalterCitty 7 months ago committed by GitHub
commit f6c9f7c581
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -46,7 +46,9 @@ class CompletionConversationApi(Resource):
parser.add_argument("limit", type=int_range(1, 100), default=20, location="args")
args = parser.parse_args()
query = db.select(Conversation).where(Conversation.app_id == app_model.id, Conversation.mode == "completion")
query = db.select(Conversation).where(
Conversation.is_deleted == False, Conversation.app_id == app_model.id, Conversation.mode == "completion"
)
if args["keyword"]:
query = query.join(Message, Message.conversation_id == Conversation.id).filter(
@ -171,7 +173,7 @@ class ChatConversationApi(Resource):
.subquery()
)
query = db.select(Conversation).where(Conversation.app_id == app_model.id)
query = db.select(Conversation).where(Conversation.app_id == app_model.id, Conversation.is_deleted == False)
if args["keyword"]:
keyword_filter = "%{}%".format(args["keyword"])

Loading…
Cancel
Save