fix: Emulate permissive on REST backend (closes #222)#223
Merged
crobinso merged 2 commits intopython-bugzilla:mainfrom Oct 11, 2024
Merged
fix: Emulate permissive on REST backend (closes #222)#223crobinso merged 2 commits intopython-bugzilla:mainfrom
permissive on REST backend (closes #222)#223crobinso merged 2 commits intopython-bugzilla:mainfrom
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #223 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 12 12
Lines 2211 2211
=========================================
Hits 2211 2211 ☔ View full report in Codecov by Sentry. |
`_BackendREST.bug_get` cannot pass a `permissive` parameter to the server as the REST API does not honor such a parameter. With this change, permissiveness is handled inside the method: If `permissive` is false and a single ID or alias is requested, the "get" method is used and an exception gets raised in case of error. Otherwise, the "search" method is used, which may return an empty list, if the client is not authenticated or an ID or alias does not exist.
8b19499 to
a349e81
Compare
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.
_BackendREST.bug_getcannot pass apermissiveparameter to the server as the REST API does not honor such a parameter.With this change, permissiveness is handled inside the method:
If
permissiveis false and a single ID or alias is requested, the "get" method is used and an exception gets raised in case of error.Otherwise, the "search" method is used, which may return an empty list, if the client is not authenticated or an ID or alias does not exist.
closes #222