mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-09-12 00:06:14 +00:00
fix: read the app move's author from the head version, not the draft's base
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5
parent
6093206ad2
commit
7350705cea
@@ -262,6 +262,17 @@ export async function migrateUserDraftsToDb(): Promise<void> {
|
||||
path,
|
||||
requestBody: { value, last_sync: writtenAt, created_at: writtenAt }
|
||||
})
|
||||
if (res.status === 'moved') {
|
||||
// Nothing was written server-side: the item left this path. Unlike a
|
||||
// conflict, where a fresher server row already holds the work, dropping
|
||||
// the LS entry here would destroy the only copy that exists. Leave it
|
||||
// and let a later mount retry — by then the user has usually followed
|
||||
// the item, and this path resolves normally.
|
||||
console.warn(
|
||||
`UserDraft LS→DB migration: ${path} was moved to ${res.moved_to}, keeping the LS copy`
|
||||
)
|
||||
continue
|
||||
}
|
||||
if (res.status === 'conflict') {
|
||||
console.info(
|
||||
`UserDraft LS→DB migration: server draft for ${path} is fresher, dropping LS copy`
|
||||
|
||||
Reference in New Issue
Block a user