diff --git a/backend/windmill-api/src/drafts.rs b/backend/windmill-api/src/drafts.rs index f5108b2c57..2ee92aa030 100644 --- a/backend/windmill-api/src/drafts.rs +++ b/backend/windmill-api/src/drafts.rs @@ -379,20 +379,6 @@ impl DraftBaseVersion { } } -/// Where the item that used to live at `path` went, for a draft still bound to -/// the old path. Resolved from the version the draft already carries — every -/// kind keeps a pointer that outlives a rename: -/// - flows: `flow_version.path` is rewritten before the old row is deleted; -/// - apps: `app_version` points at the app's surrogate id, which never moves; -/// - scripts: the new version prepends the old hash onto `parent_hashes`. -/// -/// `None` (⇒ save normally) when the draft carries no base version (a genuine -/// draft-only item), when the lineage is gone (item deleted, or recreated at -/// the new path by a CLI/git-sync push that leaves no lineage), or when the -/// caller can't see where it went. -/// -/// Read under RLS so the answer can never reveal an item the caller has no -/// access to. /// The version this draft forked from, or `None` when it has no lineage to /// follow — a kind that keeps none, a malformed payload, or a draft that was /// never forked from a deploy. Pure: no queries. This is the escape hatch the @@ -416,6 +402,22 @@ fn draft_lineage(kind: UserDraftItemKind, value: &str) -> Option