Skip to content

Commit

Permalink
#249 fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Physton committed Sep 26, 2023
1 parent a612da3 commit 6d76895
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion scripts/on_app_started.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,10 @@ async def _get_config():

@app.post("/physton_prompt/install_package")
async def _install_package(request: Request):
data = await request.json()
try:
data = await request.json()
except:
data = {}
if 'name' not in data:
return {"result": get_lang('is_required', {'0': 'name'})}
if 'package' not in data:
Expand Down

0 comments on commit 6d76895

Please sign in to comment.