Conversation
PartialType(CreateVendorDto) preserves @isnotempty() from the create DTO. Combined with @IsOptional() added by PartialType, this means: - null/undefined → @IsOptional() skips validators → OK - "" (empty string) → @IsOptional() does NOT skip → @isnotempty() fails → 400 Vendors created during onboarding can have empty descriptions, causing all subsequent PATCH updates to fail with 400 Bad Request. Replace PartialType with an explicit DTO that drops @isnotempty() on description (empty strings are valid for updates) while keeping it on name (a vendor must always have a non-empty name). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Tests cover the PATCH validation fix: - Empty description accepted (the bug: onboarding vendors have "") - Empty name still rejected - assigneeId: null accepted (unassigned vendors) - Empty website transformed to undefined - Invalid URLs, enums, and unknown properties rejected Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
[dev] [Marfuen] mariano/fix-vendor-patch-400
PR SummaryMedium Risk Overview Adds unit tests covering valid/minimal/empty updates, empty Written by Cursor Bugbot for commit 8324c51. This will update automatically on new commits. Configure here. |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
|
🎉 This PR is included in version 3.11.4 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
This is an automated pull request to release the candidate branch into production, which will trigger a deployment.
It was created by the [Production PR] action.