Skip to content

Fix creating parts from TME if the SPN contains percent signs#1337

Open
alufers wants to merge 2 commits intoPart-DB:masterfrom
alufers:fix/tme-spns-with-percent-signs
Open

Fix creating parts from TME if the SPN contains percent signs#1337
alufers wants to merge 2 commits intoPart-DB:masterfrom
alufers:fix/tme-spns-with-percent-signs

Conversation

@alufers
Copy link
Copy Markdown
Contributor

@alufers alufers commented Apr 4, 2026

Example: https://www.tme.eu/en/details/smd0603-5k1-1%25/smd-resistors/royalohm/0603saf5101t5e/

The TME API returns an URL for that part which contains an unencoded percent sign, this later causes a form validation error when trying to save the added part.

image

Fixed by percent encoding it if detected. Also added unit tests for the TMEProvider.

alufers added 2 commits April 4, 2026 17:41
The SPN ends up in the URL, which later causes validation errors n the
form. Solved by encoding the percent sign.
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 4, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 56.91%. Comparing base (96da2b9) to head (a088fbc).

Additional details and impacted files
@@             Coverage Diff              @@
##             master    #1337      +/-   ##
============================================
+ Coverage     56.39%   56.91%   +0.52%     
  Complexity     8345     8345              
============================================
  Files           612      612              
  Lines         26801    26802       +1     
============================================
+ Hits          15115    15255     +140     
+ Misses        11686    11547     -139     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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