From 0f85e3557ba12f1bf0175ebe491452c34ec2a6f7 Mon Sep 17 00:00:00 2001 From: Hash Brown Date: Tue, 26 Nov 2024 10:23:03 +0800 Subject: [PATCH 1/3] fix: site icon not showing (#11094) --- api/libs/helper.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/libs/helper.py b/api/libs/helper.py index 023240a9a4..b98a4829e8 100644 --- a/api/libs/helper.py +++ b/api/libs/helper.py @@ -31,12 +31,12 @@ class AppIconUrlField(fields.Raw): if obj is None: return None - from models.model import App, IconType + from models.model import App, IconType, Site if isinstance(obj, dict) and "app" in obj: obj = obj["app"] - if isinstance(obj, App) and obj.icon_type == IconType.IMAGE.value: + if isinstance(obj, App | Site) and obj.icon_type == IconType.IMAGE.value: return file_helpers.get_signed_file_url(obj.icon) return None From f1366e8e195d4a86759a010cd5322a8571ee57ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=9D=9E=E6=B3=95=E6=93=8D=E4=BD=9C?= Date: Tue, 26 Nov 2024 10:25:42 +0800 Subject: [PATCH 2/3] fix #11091 raise redirect issue (#11092) --- web/app/components/explore/app-list/index.tsx | 2 +- web/utils/app-redirection.ts | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/web/app/components/explore/app-list/index.tsx b/web/app/components/explore/app-list/index.tsx index bd50708cb4..b8e7939328 100644 --- a/web/app/components/explore/app-list/index.tsx +++ b/web/app/components/explore/app-list/index.tsx @@ -145,7 +145,7 @@ const Apps = ({ if (onSuccess) onSuccess() localStorage.setItem(NEED_REFRESH_APP_LIST_KEY, '1') - getRedirection(isCurrentWorkspaceEditor, app, push) + getRedirection(isCurrentWorkspaceEditor, { id: app.app_id }, push) } catch (e) { Toast.notify({ type: 'error', message: t('app.newApp.appCreateFailed') }) diff --git a/web/utils/app-redirection.ts b/web/utils/app-redirection.ts index b14f660e63..534b019250 100644 --- a/web/utils/app-redirection.ts +++ b/web/utils/app-redirection.ts @@ -4,12 +4,12 @@ export const getRedirection = ( redirectionFunc: (href: string) => void, ) => { if (!isCurrentWorkspaceEditor) { - redirectionFunc(`/app/${app.app_id}/overview`) + redirectionFunc(`/app/${app.id}/overview`) } else { if (app.mode === 'workflow' || app.mode === 'advanced-chat') - redirectionFunc(`/app/${app.app_id}/workflow`) + redirectionFunc(`/app/${app.id}/workflow`) else - redirectionFunc(`/app/${app.app_id}/configuration`) + redirectionFunc(`/app/${app.id}/configuration`) } } From 9f75970347f81e8556478fdbe402dcdbfdd2bc1d Mon Sep 17 00:00:00 2001 From: horochx <32632779+horochx@users.noreply.github.com> Date: Tue, 26 Nov 2024 10:29:00 +0800 Subject: [PATCH 3/3] fix: ops_trace_manager `from_end_user_id` (#11077) --- api/core/ops/ops_trace_manager.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/api/core/ops/ops_trace_manager.py b/api/core/ops/ops_trace_manager.py index 1069889abd..b7799ce1fb 100644 --- a/api/core/ops/ops_trace_manager.py +++ b/api/core/ops/ops_trace_manager.py @@ -445,7 +445,7 @@ class TraceTask: "ls_provider": message_data.model_provider, "ls_model_name": message_data.model_id, "status": message_data.status, - "from_end_user_id": message_data.from_account_id, + "from_end_user_id": message_data.from_end_user_id, "from_account_id": message_data.from_account_id, "agent_based": message_data.agent_based, "workflow_run_id": message_data.workflow_run_id, @@ -521,7 +521,7 @@ class TraceTask: "ls_provider": message_data.model_provider, "ls_model_name": message_data.model_id, "status": message_data.status, - "from_end_user_id": message_data.from_account_id, + "from_end_user_id": message_data.from_end_user_id, "from_account_id": message_data.from_account_id, "agent_based": message_data.agent_based, "workflow_run_id": message_data.workflow_run_id, @@ -570,7 +570,7 @@ class TraceTask: "ls_provider": message_data.model_provider, "ls_model_name": message_data.model_id, "status": message_data.status, - "from_end_user_id": message_data.from_account_id, + "from_end_user_id": message_data.from_end_user_id, "from_account_id": message_data.from_account_id, "agent_based": message_data.agent_based, "workflow_run_id": message_data.workflow_run_id,