Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Conversation

@crazyscientist
Copy link
Contributor

@crazyscientist crazyscientist commented Oct 11, 2024

_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.

closes #222

@codecov
Copy link

codecov bot commented Oct 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (567cfd6) to head (a349e81).

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.
📢 Have feedback on the report? Share it here.

`_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.
Copy link
Member

@crobinso crobinso left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@crobinso crobinso merged commit 7b8d18e into python-bugzilla:main Oct 11, 2024
@crazyscientist crazyscientist deleted the 222-rest-permissive branch October 16, 2024 14:16
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.

getbugs fails when one of the bug ids is not accesible

2 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.