mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-09-10 16:05:58 +00:00
fix: restamp only the deployer's own carried draft
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5
parent
98bce2576c
commit
fdfbbc2c50
@@ -2137,8 +2137,10 @@ async fn create_script_internal<'c>(
|
||||
if p_path != &ns.path {
|
||||
// Everything left at the old path is a draft this deploy didn't
|
||||
// consume — teammates' rows, and the deployer's own when the caller
|
||||
// asked us to keep it (a move re-deploys the DEPLOYED content, not
|
||||
// the draft). Carry them rather than strand them.
|
||||
// asked us to keep it. Carry them rather than strand them. Only the
|
||||
// deployer's own row is restamped: this runs on any path-changing
|
||||
// deploy, content edits included, and a teammate whose draft claimed
|
||||
// the new head would lose their stale-draft warning.
|
||||
let outcome = windmill_common::user_drafts::move_drafts_for_path(
|
||||
&mut tx,
|
||||
&w_id,
|
||||
@@ -2150,6 +2152,7 @@ async fn create_script_internal<'c>(
|
||||
UserDraftItemKind::Script
|
||||
.base_version_field()
|
||||
.map(|f| (f, format!("\"{}\"", hash))),
|
||||
&authed.email,
|
||||
)
|
||||
.await?;
|
||||
if outcome.left_behind > 0 {
|
||||
|
||||
Reference in New Issue
Block a user