Fix #146: PaginationMetaで返すURLに重複クエリパラメータを保持する#151
Merged
Conversation
Contributor
Author
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
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.
概要 / Overview
Issue #146 を修正します。
問題 / Problem
PaginationMetaで返すURLについて、同じクエリパラメータが2回以上指定されたときに最後のもの以外が消えてしまう問題がありました。
例:
出力では
note_statusが2回指定されているが、最後のCURRENTLY_RATED_HELPFUL以外が消えていました。解決策 / Solution
dict(request.query_params)を使用するとPythonの辞書の制約により重複キーが失われるため、代わりにrequest.url.queryから生のクエリ文字列を取得し、parse_qsで解析することで重複キーを保持するようにしました。テスト / Testing
Link to Devin run: https://app.devin.ai/sessions/ea5e8f0d875a49a9874764657cc61c33
Requested by: [email protected]