You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've added BulkSerializerMixin to a view set (and set list_serializer_class to BulkListSerializer),
trying to PATCH a single object (which should not touch bulk operations at all), raises this error: AttributeError: 'NoneType' object has no attribute 'request'
may be related to #39
using Django 1.10 with 3.4.6
The text was updated successfully, but these errors were encountered:
File "/usr/local/lib/python3.5/site-packages/rest_framework_bulk/drf3/serializers.py", line 19, in to_internal_value
request_method = getattr(getattr(self.context.get('view'), 'request'), 'method', '')
AttributeError: 'NoneType' object has no attribute 'request'
It looks like view is not pass to context.
I fixed this one via updating get_serializer_context method:
def get_serializer_context(self):
data = {}
data["view"] = self
return data
I've added
BulkSerializerMixin
to a view set (and setlist_serializer_class
toBulkListSerializer
),trying to PATCH a single object (which should not touch bulk operations at all), raises this error:
AttributeError: 'NoneType' object has no attribute 'request'
may be related to #39
using Django 1.10 with 3.4.6
The text was updated successfully, but these errors were encountered: