From a152bd696624b71cb2d8359e264deeee8884336a Mon Sep 17 00:00:00 2001 From: AlexChimTrm <132866042+AlexChim1231@users.noreply.github.com> Date: Thu, 24 Apr 2025 17:23:31 +0800 Subject: [PATCH] fix lint --- api/controllers/service_api/app/conversation.py | 1 - api/services/conversation_service.py | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/api/controllers/service_api/app/conversation.py b/api/controllers/service_api/app/conversation.py index 3c897df7c1..55600a3fd0 100644 --- a/api/controllers/service_api/app/conversation.py +++ b/api/controllers/service_api/app/conversation.py @@ -100,7 +100,6 @@ class ConversationVariablesApi(Resource): @validate_app_token(fetch_user_arg=FetchUserArg(fetch_from=WhereisUserArg.QUERY)) @marshal_with(conversation_variable_infinite_scroll_pagination_fields) def get(self, app_model: App, end_user: EndUser, c_id): - # conversational variable only for chat app app_mode = AppMode.value_of(app_model.mode) if app_mode not in {AppMode.CHAT, AppMode.AGENT_CHAT, AppMode.ADVANCED_CHAT}: diff --git a/api/services/conversation_service.py b/api/services/conversation_service.py index bbad5fd71d..afdaa49465 100644 --- a/api/services/conversation_service.py +++ b/api/services/conversation_service.py @@ -195,7 +195,7 @@ class ConversationService: last_variable = session.scalar(stmt.where(ConversationVariable.id == last_id)) if not last_variable: raise ConversationVariableNotExistsError() - + # Filter for variables created after the last_id stmt = stmt.where(ConversationVariable.created_at > last_variable.created_at)