Skip to content
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

Wrong handlers being found for ViewSets #44

Closed
tbeadle opened this issue Aug 16, 2024 · 3 comments
Closed

Wrong handlers being found for ViewSets #44

tbeadle opened this issue Aug 16, 2024 · 3 comments

Comments

@tbeadle
Copy link
Contributor

tbeadle commented Aug 16, 2024

I'm trying to use a ViewSet from adrf, but the 'get' handler is being mapped to the (non-async) 'retrieve' method from the non-adrf viewset mixin. Likewise for the other handlers. I'm curious why the coroutines 'aretrieve', 'adelete', etc. were added instead of overriding the existing 'retrieve', 'delete', etc. methods. That way a SimpleRouter should be able to find them (without the user needing to provide a mapping to viewset.as_view()). Am I missing something? Thanks so much for this project, btw!

@tbeadle
Copy link
Contributor Author

tbeadle commented Aug 19, 2024

I have opened #45 as a possibility to address this.

@sreekumarvpl
Copy link

sreekumarvpl commented Aug 23, 2024

Even I faced this issue. I was trying to override 'aretrieve' method in viewset and was not working at all, then I found that it is mapped to sync version 'retrieve' instead of 'aretrieve'.

@em1208
Copy link
Owner

em1208 commented Oct 12, 2024

I merged #48 and I will make a new release.

@em1208 em1208 closed this as completed Oct 12, 2024
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

No branches or pull requests

3 participants