Fix creating parts from TME if the SPN contains percent signs#1337
Open
alufers wants to merge 2 commits intoPart-DB:masterfrom
Open
Fix creating parts from TME if the SPN contains percent signs#1337alufers wants to merge 2 commits intoPart-DB:masterfrom
alufers wants to merge 2 commits intoPart-DB:masterfrom
Conversation
The SPN ends up in the URL, which later causes validation errors n the form. Solved by encoding the percent sign.
Codecov Report✅ All modified and coverable lines are covered by tests. 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. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.
Fixed by percent encoding it if detected. Also added unit tests for the TMEProvider.