Flow delete offers to delete its runs, history included

DELETE /runs?flow= removes every Run row of the flow but left its flow_run
rows, so a deleted flow kept appearing in the history. history=true now
drops those too, and the flow delete dialogs (editor and bulk) send it when
"Also delete its runs" is ticked.
This commit is contained in:
2026-10-15 10:52:33 +02:00
parent 7ea53ccf17
commit 6fa44bacf3
11 changed files with 124 additions and 18 deletions
+1 -1
View File
@@ -556,7 +556,7 @@ async def delete_flow(
# Its files are gone; its values and queued work would otherwise linger.
# Its runs stay: a run record is a record of what ran, and surviving the
# flow it belonged to is the point of keeping one. `DELETE /runs?flow=`
# is what clears them.
# is what clears them, and with `history=true` its cascades too.
await run_in_threadpool(controller.forget_flow, name)
await controller.reload_flow(name)
return Message(message=f"Deleted flow '{name}'")