Skip to content

Commit 163ab8f

Browse files
fix: Assistant asks about the process of mathematical thinking internationalization error
1 parent 08cc52c commit 163ab8f

File tree

1 file changed

+2
-0
lines changed
  • backend/apps/system/middleware

1 file changed

+2
-0
lines changed

backend/apps/system/middleware/auth.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ async def dispatch(self, request, call_next):
3939
validator: tuple[any] = await self.validateAssistant(assistantToken, trans)
4040
if validator[0]:
4141
request.state.current_user = validator[1]
42+
if request.state.current_user and trans.lang:
43+
request.state.current_user.language = trans.lang
4244
request.state.assistant = validator[2]
4345
origin = request.headers.get("X-SQLBOT-HOST-ORIGIN") or get_origin_from_referer(request)
4446
if origin and validator[2]:

0 commit comments

Comments
 (0)