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

[fix] AttributeError (Resolves #157) #161

Closed
wants to merge 1 commit into from

Conversation

Alireza2n
Copy link

@Alireza2n Alireza2n commented Dec 12, 2024

Problem

ASGIRequest' object has no attribute _request is raised while using viewsets.EventsViewSet . Also mentioned in #157

Solution

A simple attribute check on django_eventstream/viewsets.py:118

Credits

User tomiduss for providing the fix in issue #157 and to all other contributors especially @jkarneges 👍

@Alireza2n Alireza2n changed the title [fix] AttributeError (Resolves issues #157) [fix] AttributeError (Resolves #157) Dec 12, 2024
@jkarneges
Copy link
Member

Hmm, I could be wrong but I think the more correct fix would be to replace line 110:

return self._stream_or_respond([channel], request._request)

with:

return self._stream_or_respond([channel], request)

Maybe @enzofrnt can confirm.

@enzofrnt
Copy link
Collaborator

Hi, I have fixed it. I will make a pull request about it.
Thanks @Alireza2n.

@enzofrnt enzofrnt closed this Dec 15, 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

Successfully merging this pull request may close these issues.

3 participants