Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.
Python agentagentic-aiagentic-frameworkagentic-workflowaiautomationclaudedeepseekgenaigptllmlow-codemcpnextjsno-codeopenaipythonskillsworkflow
fix: register user model to current_user in backward invoke. (#20374)
-LAN-c3c67d9608c1
diff --git a/api/controllers/inner_api/plugin/wraps.py b/api/controllers/inner_api/plugin/wraps.pyindex 709bba3f300..b2849a79621 100644--- a/api/controllers/inner_api/plugin/wraps.py+++ b/api/controllers/inner_api/plugin/wraps.py@@ -2,12 +2,14 @@ from collections.abc import Callablefrom functools import wrapsfrom typing import Optional-from flask import request+from flask import current_app, request+from flask_login import user_logged_infrom flask_restful import reqparsefrom pydantic import BaseModelfrom sqlalchemy.orm import Sessionfrom extensions.ext_database import db+from libs.login import _get_userfrom models.account import Account, Tenantfrom models.model import EndUserfrom services.account_service import AccountService@@ -80,7 +82,12 @@ def get_user_tenant(view: Optional[Callable] = None):raise ValueError("tenant not found")kwargs["tenant_model"] = tenant_model- kwargs["user_model"] = get_user(tenant_id, user_id)++ user = get_user(tenant_id, user_id)+ kwargs["user_model"] = user++ current_app.login_manager._update_request_context_with_user(user) # type: ignore+ user_logged_in.send(current_app._get_current_object(), user=_get_user()) # type: ignorereturn view_func(*args, **kwargs)