-
Notifications
You must be signed in to change notification settings - Fork 2.8k
fix: Fix the issues of raise exception
#5130
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
liuruibin
merged 14 commits into
1Panel-dev:v2
from
wangliang181230:PR/fix-throw-exception
Apr 22, 2026
Merged
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
98a0629
fix: Fix the keyword for `raise exception`
wangliang181230 d3e04af
小调整
wangliang181230 ade3de4
修正错误的缓存值。
wangliang181230 e503d09
fix: Fix the issues for `raise exception`
wangliang181230 dd92ce6
Merge remote-tracking branch 'upstream/v2' into PR/fix-throw-exception
wangliang181230 1b019b4
重命名变量
wangliang181230 0f2868a
小调整。
wangliang181230 ace367a
optimize style
wangliang181230 41bd9f2
fix
wangliang181230 b7d9472
fix
wangliang181230 43ccb2c
revert
wangliang181230 3b7f549
小调整
wangliang181230 3682b4c
Merge remote-tracking branch 'upstream/v2' into PR/fix-throw-exception
wangliang181230 3d7d8f3
revert
wangliang181230 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -219,9 +219,9 @@ def _is_unsafe_ip(self, ip: str) -> bool: | |
| def get_url_content(url, application_id: str): | ||
| application = Application.objects.filter(id=application_id).first() | ||
| if application is None: | ||
| return AppApiException(500, _('Application does not exist')) | ||
| 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')) | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 关键字错误,这个方法并不是一个返回异常对象的方法。 |
||
| file_limit = 50 * 1024 * 1024 | ||
| if application.file_upload_setting and application.file_upload_setting.get('fileLimit'): | ||
| file_limit = application.file_upload_setting.get('fileLimit') * 1024 * 1024 | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -47,12 +47,11 @@ class IntentModel extends AppNodeModel { | |
| }) | ||
|
|
||
| if (branch_condition_list) { | ||
|
|
||
| const FORM_ITEMS_HEIGHT = 397 // 上方表单占用高度 | ||
|
|
||
| for (let index = 0; index < branch_condition_list.length; index++) { | ||
| const element = branch_condition_list[index] | ||
|
|
||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. fix style |
||
| anchors.push({ | ||
| x: x + width / 2 - 10, | ||
| y: showNode | ||
|
|
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
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