-
Notifications
You must be signed in to change notification settings - Fork 148
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
Assertion error when adding a post non-detail action #123
Comments
For completeness, I got this log:
I think that the problem is in the line 70, where it says Cheers, |
I made a mistake, reopening... |
Yeah - unless I'm missing something, the condition doesn't look correct. django-rules/rules/contrib/rest_framework.py Lines 64 to 70 in 55cd1df
It shouldn't be necessary to check the extra action handler function - the router should configure the view with the correct arguments. The condition should probably be: if self.detail:
obj = self.get_object() |
Yep, I thought the same.
Cheers,
…--
Cuando tus fuerzas terminan, las de mi Dios comienzan.
|
Hello,
When adding a non-standard non-detail extra action to a viewset, the "AutoRulesPermissionViewSetMixin" raises an assertion error. Note that it only occurs if you map a post action to an already-defined get extra.
For example:
Cheers,
The text was updated successfully, but these errors were encountered: