mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-05 10:28:06 -05:00
refac
This commit is contained in:
@@ -60,10 +60,10 @@ async def create_new_toolkit(
|
||||
toolkit = Tools.get_tool_by_id(form_data.id)
|
||||
if toolkit is None:
|
||||
try:
|
||||
form_data.content = replace_imports(form_data.content)
|
||||
toolkit_module, frontmatter = load_toolkit_module_by_id(
|
||||
form_data.id, content=form_data.content
|
||||
)
|
||||
form_data.content = replace_imports(form_data.content)
|
||||
form_data.meta.manifest = frontmatter
|
||||
|
||||
TOOLS = request.app.state.TOOLS
|
||||
@@ -126,10 +126,10 @@ async def update_toolkit_by_id(
|
||||
user=Depends(get_admin_user),
|
||||
):
|
||||
try:
|
||||
form_data.content = replace_imports(form_data.content)
|
||||
toolkit_module, frontmatter = load_toolkit_module_by_id(
|
||||
id, content=form_data.content
|
||||
)
|
||||
form_data.content = replace_imports(form_data.content)
|
||||
form_data.meta.manifest = frontmatter
|
||||
|
||||
TOOLS = request.app.state.TOOLS
|
||||
|
||||
Reference in New Issue
Block a user