Skip to content

fix: Fix the issues of raise exception#5130

Merged
liuruibin merged 14 commits into1Panel-dev:v2from
wangliang181230:PR/fix-throw-exception
Apr 22, 2026
Merged

fix: Fix the issues of raise exception#5130
liuruibin merged 14 commits into1Panel-dev:v2from
wangliang181230:PR/fix-throw-exception

Conversation

@wangliang181230
Copy link
Copy Markdown
Contributor

@wangliang181230 wangliang181230 commented Apr 21, 2026

What this PR does / why we need it?

fix: Fix the issue of raise exception

Summary of your change

修复 抛出异常 相关的问题

判断器中,不为空 判断出现异常的截图:
图片

Please indicate you've done the following:

  • Made sure tests are passing and test coverage is added if needed.
  • Made sure commit message follow the rule of Conventional Commits specification.
  • Considered the docs impact and opened a new docs issue or PR with docs changes if needed.

@f2c-ci-robot
Copy link
Copy Markdown

f2c-ci-robot Bot commented Apr 21, 2026

Adding the "do-not-merge/release-note-label-needed" label because no release-note block was detected, please follow our release note process to remove it.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@f2c-ci-robot
Copy link
Copy Markdown

f2c-ci-robot Bot commented Apr 21, 2026

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

for (let index = 0; index < branch_condition_list.length; index++) {
const element = branch_condition_list[index]

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fix style

@wangliang181230 wangliang181230 changed the title fix: Fix the keyword for raise exception fix: Fix the issue of raise exception Apr 21, 2026
raise AppApiException(500, _('Application does not exist'))
if not application.file_upload_enable:
return AppApiException(500, _('File upload is not enabled'))
raise AppApiException(500, _('File upload is not enabled'))
Copy link
Copy Markdown
Contributor Author

@wangliang181230 wangliang181230 Apr 21, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

关键字错误,这个方法并不是一个返回异常对象的方法。

@wangliang181230 wangliang181230 changed the title fix: Fix the issue of raise exception fix: Fix the issues of raise exception Apr 21, 2026
try:
return source_value is not None and len(source_value) > 0
except Exception:
return True
Copy link
Copy Markdown
Contributor Author

@wangliang181230 wangliang181230 Apr 21, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

len(source_value) 可能会抛出异常,捕获处理。
因为抛出异常时 source_value is not None 已经判定为 True,表示对象不为空,所以len方法出现异常后,直接 return True

@liuruibin liuruibin merged commit 3f6ffef into 1Panel-dev:v2 Apr 22, 2026
1 of 2 checks passed
@wangliang181230 wangliang181230 deleted the PR/fix-throw-exception branch April 22, 2026 13:44
wangliang181230 added a commit to wangliang181230/MaxKB that referenced this pull request Apr 22, 2026
* fix: Fix the keyword for `raise exception`

* 小调整

* 修正错误的缓存值。

* fix: Fix the issues for `raise exception`

* 重命名变量

* 小调整。

* optimize style

* fix

* fix

* revert

* 小调整

* revert
wangliang181230 added a commit to wangliang181230/MaxKB that referenced this pull request Apr 22, 2026
wangdan-fit2cloud pushed a commit that referenced this pull request Apr 23, 2026
* fix: Fix the keyword for `raise exception`

* 小调整

* 修正错误的缓存值。

* fix: Fix the issues for `raise exception`

* 重命名变量

* 小调整。

* optimize style

* fix

* fix

* revert

* 小调整

* revert
wangdan-fit2cloud added a commit that referenced this pull request Apr 23, 2026
* feat: Virtualized tree

* feat: Drag and drop virtual tree

* feat: Open the first level directory by default

* feat: Change file name

* perf: tree filter

* fix: virtualized

* fix: Fix the parsing error of `image_id`

* fix: Fix null pointer exception (#5113)

* feat: enhance request payload handling for AI messages with tool calls

--bug=1068446@tapd-62980211 --user=刘瑞斌 【应用】AI对话开启思考过程并引用智能体作为技能,对话调用技能后,返回报错 https://www.tapd.cn/62980211/s/1902267

* fix: update position handling in drag-and-drop functionality

* fix: update package versions for langchain-core, langchain-google-genai, langchain-aws, and pypdf

* fix: update pypdf package version to 6.10.2

* fix: Fix the parameter issue of the `str.format(...)` method (#5119)

* fix: Fix the parameter issue of the `str.format(...)` method

* build(deps): bump langchain-openai in the pip group across 1 directory

Bumps the pip group with 1 update in the / directory: [langchain-openai](https://github.com/langchain-ai/langchain).


Updates `langchain-openai` from 1.1.13 to 1.1.14
- [Release notes](https://github.com/langchain-ai/langchain/releases)
- [Commits](langchain-ai/langchain@langchain-openai==1.1.13...langchain-openai==1.1.14)

---
updated-dependencies:
- dependency-name: langchain-openai
  dependency-version: 1.1.14
  dependency-type: direct:production
  dependency-group: pip
...

Signed-off-by: dependabot[bot] <support@github.com>

* fix: update langchain-openai package version to 1.1.14

* feat: Supports tree selector (#5122)

* fix: PDF preview of XSS attack (#5123)

* fix: PDF preview of XSS attack

* fix: PDF preview of XSS attack

* feat: Add style attribute to markdown rendering a tag (#5124)

* feat: Copy and paste cross page canvas nodes (#5125)

* fix: enhance image URL handling in response processing for multiple formats

* fix: update default docker image tag to v2.9.0-dev

* fix: Knowledge search node not real remove

* fix: standardize formatting and improve error handling in model parameters validation

* fix: add base_url parameter to various model classes and update initialization logic

* feat: Resource dependency and resource dependent dialog view

* feat: Support node disabling and enabling (#5135)

* fix: enhance text_to_speech method to support additional models and handle audio data retrieval

* feat: add MiniMax model provider with LLM and TTS support

Add MiniMax as a new model provider supporting:
- Chat LLM models: MiniMax-M2.5 and MiniMax-M2.5-highspeed (204K context)
- TTS models: speech-2.8-hd and speech-2.8-turbo

MiniMax LLM uses OpenAI-compatible API at api.minimax.io/v1.
MiniMax TTS uses the native T2A v2 API with multiple voice options.

* feat: upgrade MiniMax default model to M2.7

- Add MiniMax-M2.7 and MiniMax-M2.7-highspeed to model list
- Set MiniMax-M2.7 as default model
- Keep all previous models as alternatives

* fix: refactor voice selection and audio settings in TTS model parameters

* fix: update default voice_id to Chinese (Mandarin)_Lyrical_Voice in tts.py

* fix: Whether to call the model after deleting the default parameters of the model or use the old parameters (#5137)

* build(deps): bump python-dotenv in the pip group across 1 directory

Bumps the pip group with 1 update in the / directory: [python-dotenv](https://github.com/theskumar/python-dotenv).


Updates `python-dotenv` from 1.1.1 to 1.2.2
- [Release notes](https://github.com/theskumar/python-dotenv/releases)
- [Changelog](https://github.com/theskumar/python-dotenv/blob/main/CHANGELOG.md)
- [Commits](theskumar/python-dotenv@v1.1.1...v1.2.2)

---
updated-dependencies:
- dependency-name: python-dotenv
  dependency-version: 1.2.2
  dependency-type: direct:production
  dependency-group: pip
...

Signed-off-by: dependabot[bot] <support@github.com>

* feat: add long term memory fields and settings to application model

* fix: Fix the issues of `raise exception` (#5130)

* fix: Fix the keyword for `raise exception`

* 小调整

* 修正错误的缓存值。

* fix: Fix the issues for `raise exception`

* 重命名变量

* 小调整。

* optimize style

* fix

* fix

* revert

* 小调整

* revert

* feat: Mapping resource list

* fix: Fix null pointer exception (#5136)

* feat: Add regex to clean up content in long term memory extraction

* fix: add copilot-instructions.md to .gitignore

* perf: tree style

* refactor: streamline long term memory extraction scheduling

* fix: add api_base field to model credentials and update validation logic

* perf: Model select item display

* fix: update schedule_extract_long_term_memory function parameters

* fix: clean up formatting and improve tooltip display in index.vue

* perf: long-term memory translation

* chore: update volcengine-python-sdk version to 5.0.24 in pyproject.toml

* fix: remove popper-class from el-tooltip components in index.vue

* fix: add popper-class to el-tooltip components for improved styling in index.vue

* fix: update API base URL and ensure reasoning_split is set in extra_body

* fix: adjust history chat record check to allow for more than one entry in _run_extract function

Co-authored-by: Copilot <copilot@github.com>

* fix: disable dropdown items for unpublished entries

--bug=1068813@tapd-62980211 --user=刘瑞斌 【github#5146】未发布的智能体可以创建触发器,但即使智能体发布后触发器也无法触发 https://www.tapd.cn/62980211/s/1910656

* feat: Canvas pasting follows the mouse, fixing the problem of duplicate pasting of canvas pasting (#5151)

* fix: virtualized tree

* Potential fix for pull request finding 'Unused variable, import, function or class'

Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>

* Potential fix for pull request finding 'Unused variable, import, function or class'

Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: shaohuzhang1 <shaohu.zhang@fit2cloud.com>
Co-authored-by: 王良 <841369634@qq.com>
Co-authored-by: CaptainB <bin@fit2cloud.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: shaohuzhang1 <80892890+shaohuzhang1@users.noreply.github.com>
Co-authored-by: wxg0103 <727495428@qq.com>
Co-authored-by: zhangzhanwei <zhanwei.zhang@fit2cloud.com>
Co-authored-by: octo-patch <octo-patch@users.noreply.github.com>
Co-authored-by: PR Bot <pr-bot@minimaxi.com>
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants