fix is_disable_switch_model

This commit is contained in:
Qing
2022-11-25 08:55:10 +08:00
parent d44dd8822c
commit f7d7e89197
4 changed files with 42 additions and 18 deletions

View File

@@ -204,6 +204,9 @@ def get_is_desktop():
@app.route("/model", methods=["POST"])
def switch_model():
if is_disable_model_switch:
return "Switch model is disabled", 400
new_name = request.form.get("name")
if new_name == model.name:
return "Same model", 200