mirror of https://github.com/langgenius/dify.git
fix(mcp): current_user not being set in MCP requests (#25393)
This commit is contained in:
parent
c595c03452
commit
e180c19cca
|
|
@ -86,9 +86,7 @@ def load_user_from_request(request_from_flask_login):
|
|||
if not app_mcp_server:
|
||||
raise NotFound("App MCP server not found.")
|
||||
end_user = (
|
||||
db.session.query(EndUser)
|
||||
.where(EndUser.external_user_id == app_mcp_server.id, EndUser.type == "mcp")
|
||||
.first()
|
||||
db.session.query(EndUser).where(EndUser.session_id == app_mcp_server.id, EndUser.type == "mcp").first()
|
||||
)
|
||||
if not end_user:
|
||||
raise NotFound("End user not found.")
|
||||
|
|
|
|||
Loading…
Reference in New Issue