Skip to content

Fix mapping exception on empty PartTypeId during bulk part creation - #522

Open
Sylensky wants to merge 1 commit into
replaysMike:masterfrom
Sylensky:bugfix/digikey-api-parsing
Open

Fix mapping exception on empty PartTypeId during bulk part creation#522
Sylensky wants to merge 1 commit into
replaysMike:masterfrom
Sylensky:bugfix/digikey-api-parsing

Conversation

@Sylensky

@Sylensky Sylensky commented Aug 4, 2026

Copy link
Copy Markdown

AutoMapper's default string->long conversion threw a FormatException when a part's PartTypeId was an empty string, crashing bulk part creation. Added a safe TryParse-based mapping that defaults to 0, letting the existing fallback logic resolve the part type as before.

AutoMapper's default string->long conversion threw a FormatException when a
part's PartTypeId was an empty string, crashing bulk part creation.
Added a safe TryParse-based mapping that defaults to 0, letting the existing
fallback logic resolve the part type as before.
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