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
Fixed #12241 -- Preserved query strings when using "Save and continue/add another" in admin #17194
Conversation
36414a9
to
c49b0dd
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice to see progress on this!
I see that we also have _saveasnew
in response_change
- is this deliberately handled differently? I see it's bundled with the _continue
handling in response_add
, so we're changing the behaviour there.
Either way, I think we should add tests for this case too.
@LilyFoote Thank you for the feedback 😄 After looking more closely into this, I believe the |
I think you're right! In that case I think it's reasonable to delete the unreachable code. Though perhaps in a separate PR. @felixxm @nessita Thoughts? For this PR, I still think we should add a test for preserving the query strings (or explicitly not preserving them) for the |
Makes sense! Already updated the tests to include the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(Adding my 2¢ since I looked at the previous PR)
Just tested it out, looks nice 🏆
I didn't really read the code in anger although the only thing that catches my eye is "qsl" which made me wonder what it meant … eventually saw the docs for parse_qsl()
as returning list.
@marianaasilva Thanks 👍 Have you checked how it works with options that are currently preserved ( |
Good catch 🎯 Yes we should remove it in a separate PR. @marianaasilva Would you like to prepare it? |
…ntinue/add another" in admin. Co-authored-by: Grady Yu <gradyy@users.noreply.github.com> Co-authored-by: David Sanders <shang.xiao.sanders@gmail.com> Co-authored-by: Matthew Newton <matthewn@berkeley.edu>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@marianaasilva Thanks 👍
I squashed commits, and simplified tests.
Sure! Working on it 😄 |
Fix for ticket 12241 to ensure the query string is preserved when clicking "Save and add another" or "Save and continue"
Added tests for query string with changelist filters
Based on @matthewn's patch pr/16206