Skip to content

fix: allow resetting volume backup retention to unlimited#4588

Open
ravindu0823 wants to merge 1 commit into
Dokploy:canaryfrom
ravindu0823:fix/volume-backup-keep-latest-reset
Open

fix: allow resetting volume backup retention to unlimited#4588
ravindu0823 wants to merge 1 commit into
Dokploy:canaryfrom
ravindu0823:fix/volume-backup-keep-latest-reset

Conversation

@ravindu0823

Copy link
Copy Markdown

@-

Clearing the "Keep Latest Backups" field on a volume backup did not
persist: the form computed `null` for an empty input but then collapsed
it back to `undefined` (`preparedKeepLatestCount ?? undefined`) before
sending it. The update uses drizzle's `.set()`, which silently omits
`undefined` keys, so the previous limit was left untouched and could
never be turned off again.

Extract the decision into a pure `prepareKeepLatestCount` helper that
returns `null` (unlimited) for an empty/whitespace input and the numeric
value otherwise, and send that value directly so the column is written.

Fixes Dokploy#4184

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@ravindu0823 ravindu0823 requested a review from Siumauricio as a code owner June 9, 2026 08:47
@dosubot dosubot Bot added the size:S This PR changes 10-29 lines, ignoring generated files. label Jun 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:S This PR changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant