Timothy Jaeryang Baek пре 2 месеци
родитељ
комит
49a6211d36
1 измењених фајлова са 2 додато и 3 уклоњено
  1. 2 3
      backend/open_webui/routers/functions.py

+ 2 - 3
backend/open_webui/routers/functions.py

@@ -146,15 +146,14 @@ async def sync_functions(
                 function.id,
                 content=function.content,
             )
+
+        return Functions.sync_functions(user.id, form_data.functions)
     except Exception as e:
         log.exception(f"Failed to load a function: {e}")
         raise HTTPException(
             status_code=status.HTTP_400_BAD_REQUEST,
             detail=ERROR_MESSAGES.DEFAULT(e),
         )
-    
-
-    return Functions.sync_functions(user.id, form_data.functions)
 
 
 ############################