Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Force evaluation of reverse_lazy urls in set_query_parameters. Fixes #1311 #1312

Closed
wants to merge 2 commits into from

Conversation

isik-kaplan
Copy link
Contributor

Passing reverse_lazy url to SpectacularRedocView errors because set_query_parameters calls urlls.parse.urlparse on url which may not be a string but a 'django.utils.functional.lazy..proxy'. Forcing url to be string fixes this issue.

…franzel#1311

Passing reverse_lazy url to SpectacularRedocView errors because set_query_parameters calls urlls.parse.urlparse on url which may not be a string but a 'django.utils.functional.lazy.<locals>.__proxy__'. Forcing url to be string fixes this issue.
Copy link

codecov bot commented Oct 17, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.57%. Comparing base (0dea78c) to head (09d333d).
Report is 12 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1312   +/-   ##
=======================================
  Coverage   98.57%   98.57%           
=======================================
  Files          74       74           
  Lines        9068     9069    +1     
=======================================
+ Hits         8939     8940    +1     
  Misses        129      129           

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

@isik-kaplan
Copy link
Contributor Author

I figured you could squash and merge but re-reading the contributing I can rebase this and make it a single commit if you want. (Can't quite remember if squash and merge UI in github allows you to edit the squashed commit message)

@isik-kaplan
Copy link
Contributor Author

Hey @tfranzel is there anything I need to add to this PR that I'm missing? Please do let me know what's needed to have this merged.

tfranzel added a commit that referenced this pull request Nov 30, 2024
@tfranzel tfranzel mentioned this pull request Nov 30, 2024
tfranzel added a commit that referenced this pull request Nov 30, 2024
* Force evaluation of reverse_lazy urls in set_query_parameters. Fixes #1311

Passing reverse_lazy url to SpectacularRedocView errors because set_query_parameters calls urlls.parse.urlparse on url which may not be a string but a 'django.utils.functional.lazy.<locals>.__proxy__'. Forcing url to be string fixes this issue.

* Update plumbing.py

* fix second lazy url issue & add test #1312

---------

Co-authored-by: Işık Kaplan <[email protected]>
@tfranzel
Copy link
Owner

tfranzel commented Nov 30, 2024

squash-merged in #1339. fixed another location and addded a test. thanks!

@tfranzel tfranzel closed this Nov 30, 2024
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.

2 participants