pull/18581/head
AlexChimTrm 1 year ago
parent 6c21b7629b
commit a152bd6966

@ -100,7 +100,6 @@ class ConversationVariablesApi(Resource):
@validate_app_token(fetch_user_arg=FetchUserArg(fetch_from=WhereisUserArg.QUERY)) @validate_app_token(fetch_user_arg=FetchUserArg(fetch_from=WhereisUserArg.QUERY))
@marshal_with(conversation_variable_infinite_scroll_pagination_fields) @marshal_with(conversation_variable_infinite_scroll_pagination_fields)
def get(self, app_model: App, end_user: EndUser, c_id): def get(self, app_model: App, end_user: EndUser, c_id):
# conversational variable only for chat app # conversational variable only for chat app
app_mode = AppMode.value_of(app_model.mode) app_mode = AppMode.value_of(app_model.mode)
if app_mode not in {AppMode.CHAT, AppMode.AGENT_CHAT, AppMode.ADVANCED_CHAT}: if app_mode not in {AppMode.CHAT, AppMode.AGENT_CHAT, AppMode.ADVANCED_CHAT}:

@ -195,7 +195,7 @@ class ConversationService:
last_variable = session.scalar(stmt.where(ConversationVariable.id == last_id)) last_variable = session.scalar(stmt.where(ConversationVariable.id == last_id))
if not last_variable: if not last_variable:
raise ConversationVariableNotExistsError() raise ConversationVariableNotExistsError()
# Filter for variables created after the last_id # Filter for variables created after the last_id
stmt = stmt.where(ConversationVariable.created_at > last_variable.created_at) stmt = stmt.where(ConversationVariable.created_at > last_variable.created_at)

Loading…
Cancel
Save