-
-
Notifications
You must be signed in to change notification settings - Fork 34
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
Additional async support for ControllerBase #216
Conversation
Codecov ReportAttention: Patch coverage is
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## master #216 +/- ##
==========================================
- Coverage 99.75% 99.71% -0.04%
==========================================
Files 56 56
Lines 2458 2491 +33
==========================================
+ Hits 2452 2484 +32
- Misses 6 7 +1 ☔ View full report in Codecov by Sentry. |
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.
@le-sun You did an awesome work here. Thanks so much for working on this.
@le-sun In your async please skip django version < 4.2 |
Updated |
@@ -18,7 +18,7 @@ During the handling of a request, the `has_permission` method is automatically i | |||
in the permission list of the route function. However, `has_object_permission` is not triggered since | |||
it requires an object for permission validation. As a result of that, `has_object_permission` method for permissions are | |||
invoked when attempting to retrieve an object using the `get_object_or_exception` | |||
or `get_object_or_none` methods within the controller. | |||
or `get_object_or_none` methods within the controller. Async versions of these methods are supported with `aget_object_or_exception` and `get_object_or_none`. |
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.
It is too late for this PR, but there is a typo in the last method name get_object_or_none
. I guess the correct name here is aget_object_or_none
. :)
Added in async methods for
get_object_or_exception
andget_object_or_none
, which should resolve #215