-
Notifications
You must be signed in to change notification settings - Fork 2.8k
[CLOSE] fix: Fix the . dot in the regex not matching \n
#5158
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
Changes from all commits
43e2f05
7a8f410
5f7fa53
eb9debe
8bb4c36
8a51213
31451b4
0738109
561c5c7
1f73623
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -186,14 +186,14 @@ def write_image(zip_path: str, image_list: List[str]): | |
| if search: | ||
| text = search.group() | ||
| if text.startswith('(./oss/file/'): | ||
| r = text.replace('(./oss/file/', '').replace(')', '') | ||
| r = r.strip().split(" ")[0] | ||
| if not is_valid_uuid(r): | ||
| break | ||
| file = QuerySet(File).filter(id=r).first() | ||
| image_id = text.replace('(./oss/file/', '').replace(')', '') | ||
| image_id = image_id.strip().split(" ")[0] | ||
| if not is_valid_uuid(image_id): | ||
| continue | ||
| file = QuerySet(File).filter(id=image_id).first() | ||
| if file is None: | ||
| break | ||
| zip_inner_path = os.path.join('oss', 'file', r) | ||
| continue | ||
|
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. 顺便修复:所有图片处理完 |
||
| zip_inner_path = os.path.join('oss', 'file', image_id) | ||
| file_path = os.path.join(zip_path, zip_inner_path) | ||
| if not os.path.exists(os.path.dirname(file_path)): | ||
| os.makedirs(os.path.dirname(file_path)) | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -150,8 +150,8 @@ def one_meta(self, with_valid=False): | |
| super().is_valid(raise_exception=True) | ||
| model = QuerySet(Model).filter(id=self.data.get("id"), | ||
| workspace_id=self.data.get('workspace_id', 'None')).first() | ||
| if model is None: | ||
| raise AppApiException(500, _('Model does not exist')) | ||
| if model is None: | ||
| raise AppApiException(500, _('Model does not exist')) | ||
|
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. 顺便优化: |
||
| return {'id': str(model.id), 'provider': model.provider, 'name': model.name, 'model_type': model.model_type, | ||
| 'model_name': model.model_name, | ||
| 'status': model.status, | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -53,5 +53,6 @@ def undeploy(trigger, **kwargs): | |
| @return: | ||
| """ | ||
| for simple_trigger_handler in simple_trigger_handlers: | ||
| return simple_trigger_handler.undeploy(trigger, **kwargs) | ||
| if simple_trigger_handler.support(trigger, **kwargs): | ||
| return simple_trigger_handler.undeploy(trigger, **kwargs) | ||
| raise Exception("不支持的触发器类型") | ||
|
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. 顺便优化:遗漏了判断。 |
||
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.
遗漏了
text =