Skip to content

fix: clear TimeOff entries in seed --clear#149

Merged
dholbach merged 1 commit into
mainfrom
fix/seed-clear-timeoff
Jul 1, 2026
Merged

fix: clear TimeOff entries in seed --clear#149
dholbach merged 1 commit into
mainfrom
fix/seed-clear-timeoff

Conversation

@dholbach

@dholbach dholbach commented Jul 1, 2026

Copy link
Copy Markdown
Owner

Problem

seed_sample_data --clear left TimeOff records behind. Every --clear + reseed cycle accumulated more vacation/training entries.

Fix

  • Added SEED_TIMEOFF_TITLES constant (mirrors the titles in _create_time_off)
  • _clear() now deletes matching TimeOff rows and includes them in the "nothing to clear" guard and the summary message
  • Audited all other _create_* methods — everything else is covered (cascade from Client/Session/Invoice, or explicit deletes)

Test plan

  • Lint passes (./dev.py lint)
  • Manual: ./dev.py manage seed_sample_data --clear --yes leaves no TimeOff rows behind

🤖 Generated with Claude Code

TimeOff records created by seed_sample_data were never deleted on
--clear. Add SEED_TIMEOFF_TITLES constant and delete matching rows
in _clear(), same pattern as SEED_TODO_TITLES.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@dholbach dholbach merged commit ab24d81 into main Jul 1, 2026
1 check passed
@dholbach dholbach deleted the fix/seed-clear-timeoff branch July 1, 2026 09:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant