fix(validation): reject non-positive time-entry duration_minutes (PMS-384) #291
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/PMS-384-time-entry-duration-validation"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
A directly-supplied duration_minutes bypassed the service's start/end negativity guard, so a negative value was stored and corrupted timesheet sums and total_amount. Add #[validate(range(min = 1))] on Create/Update TimeEntryRequest so the request layer rejects it with a 422.
Verified in-container (just pre-commit): fmt + clippy + check + unit + doc tests green.
Fixes PMS-384.