Skip to content

Commit 1566ae7

Browse files
authored
fix: Application deleted, workflow page error reported (#2743)
1 parent b3feb24 commit 1566ae7

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

apps/application/serializers/application_serializers.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1209,7 +1209,9 @@ def get_application(self, app_id, with_valid=True):
12091209
self.is_valid(raise_exception=True)
12101210
if with_valid:
12111211
self.is_valid()
1212-
embed_application = QuerySet(Application).get(id=app_id)
1212+
embed_application = QuerySet(Application).filter(id=app_id).first()
1213+
if embed_application is None:
1214+
raise AppApiException(500, _('Application does not exist'))
12131215
if embed_application.type == ApplicationTypeChoices.WORK_FLOW:
12141216
work_flow_version = QuerySet(WorkFlowVersion).filter(application_id=embed_application.id).order_by(
12151217
'-create_time')[0:1].first()
@@ -1332,4 +1334,3 @@ async def get_mcp_tools(servers):
13321334
}
13331335
for tool in asyncio.run(get_mcp_tools({server: servers[server]}))]
13341336
return tools
1335-

ui/src/workflow/nodes/application-node/index.vue

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -146,10 +146,9 @@
146146
<template #label>
147147
<div class="flex align-center">
148148
<div class="mr-4">
149-
<span
150-
>{{ $t('views.applicationWorkflow.nodes.aiChatNode.returnContent.label')
151-
}}</span
152-
>
149+
<span>{{
150+
$t('views.applicationWorkflow.nodes.aiChatNode.returnContent.label')
151+
}}</span>
153152
</div>
154153
<el-tooltip effect="dark" placement="right" popper-class="max-w-200">
155154
<template #content>
@@ -288,7 +287,7 @@ const update_field = () => {
288287
}
289288
})
290289
.catch((err) => {
291-
// set(props.nodeModel.properties, 'status', 500)
290+
set(props.nodeModel.properties, 'status', 500)
292291
})
293292
}
294293

0 commit comments

Comments
 (0)