mirror of
https://github.com/QuantumNous/new-api.git
synced 2026-05-15 06:17:00 +00:00
When syncing official models, clicking "Apply overwrite" with zero selected conflict fields resulted in no request being sent and the modal simply closing. This blocked creation of missing models/vendors even though the backend supports an empty `overwrite` array and will still create missing items. Changes: - Remove the early-return guard in `UpstreamConflictModal.handleOk` - Always call `onSubmit(payload)` even when `payload` is empty - Keep closing behavior when the request succeeds Behavior: - Users can now proceed with upstream sync without selecting any conflict fields - Missing models/vendors are created as expected - Existing models are not overwritten unless fields are explicitly selected Affected: - web/src/components/table/models/modals/UpstreamConflictModal.jsx Quality: - Lint passes - No breaking changes - No visual/UI changes beyond the intended behavior Test plan: 1) Open official models sync and trigger a conflicts preview 2) Click "Apply overwrite" without selecting any fields 3) Expect the sync to proceed and a success toast indicating created models 4) Re-try with some fields selected to confirm overwrites still work