fix: 拖选文字时弹窗不再误关闭 #27

Merged
hera merged 16 commits from fix/next-batch into main 2026-04-12 14:11:46 +00:00
Showing only changes of commit 0acc49ee85 - Show all commits

View File

@@ -858,6 +858,9 @@ def update_recipe(recipe_id: int, update: RecipeUpdate, user=Depends(get_current
if update.name is not None:
c.execute("UPDATE recipes SET name = ? WHERE id = ?", (update.name, recipe_id))
# Re-translate en_name if name changed and no explicit en_name provided
if update.en_name is None:
c.execute("UPDATE recipes SET en_name = ? WHERE id = ?", (auto_translate(update.name), recipe_id))
if update.note is not None:
c.execute("UPDATE recipes SET note = ? WHERE id = ?", (update.note, recipe_id))
if update.en_name is not None: