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
Hi, i use GenericForeignKey in my project and get the following error:
Traceback (most recent call last):
File "/home/develop21/projects/eds_vodokanal_rnd/.venv/lib/python3.6/site-packages/django/core/handlers/exception.py", line 35, in inner
response = get_response(request)
File "/home/develop21/projects/eds_vodokanal_rnd/.venv/lib/python3.6/site-packages/django/core/handlers/base.py", line 128, in _get_response
response = self.process_exception_by_middleware(e, request)
File "/home/develop21/projects/eds_vodokanal_rnd/.venv/lib/python3.6/site-packages/django/core/handlers/base.py", line 126, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/home/develop21/projects/eds_vodokanal_rnd/.venv/lib/python3.6/site-packages/django/views/decorators/csrf.py", line 54, in wrapped_view
return view_func(*args, **kwargs)
File "/home/develop21/projects/eds_vodokanal_rnd/.venv/lib/python3.6/site-packages/rest_framework/viewsets.py", line 103, in view
return self.dispatch(request, *args, **kwargs)
File "/home/develop21/projects/eds_vodokanal_rnd/.venv/lib/python3.6/site-packages/rest_framework/views.py", line 483, in dispatch
response = self.handle_exception(exc)
File "/home/develop21/projects/eds_vodokanal_rnd/.venv/lib/python3.6/site-packages/rest_framework/views.py", line 443, in handle_exception
self.raise_uncaught_exception(exc)
File "/home/develop21/projects/eds_vodokanal_rnd/.venv/lib/python3.6/site-packages/rest_framework/views.py", line 480, in dispatch
response = handler(request, *args, **kwargs)
File "/home/develop21/projects/eds_vodokanal_rnd/project/views.py", line 59, in list
return Response(serializer.data)
File "/home/develop21/projects/eds_vodokanal_rnd/.venv/lib/python3.6/site-packages/rest_framework/serializers.py", line 765, in data
ret = super(ListSerializer, self).data
File "/home/develop21/projects/eds_vodokanal_rnd/.venv/lib/python3.6/site-packages/rest_framework/serializers.py", line 262, in data
self._data = self.to_representation(self.instance)
File "/home/develop21/projects/eds_vodokanal_rnd/.venv/lib/python3.6/site-packages/rest_framework/serializers.py", line 683, in to_representation
self.child.to_representation(item) foritemin iterable
File "/home/develop21/projects/eds_vodokanal_rnd/.venv/lib/python3.6/site-packages/django/db/models/query.py", line 272, in __iter__
self._fetch_all()
File "/home/develop21/projects/eds_vodokanal_rnd/.venv/lib/python3.6/site-packages/django/db/models/query.py", line 1182, in _fetch_all
self._result_cache = list(self._iterable_class(self))
File "/home/develop21/projects/eds_vodokanal_rnd/.venv/lib/python3.6/site-packages/django/db/models/query.py", line 63, in __iter__
obj = model_cls.from_db(db, init_list, row[model_fields_start:model_fields_end])
File "/home/develop21/projects/eds_vodokanal_rnd/.venv/lib/python3.6/site-packages/django/db/models/base.py", line 507, in from_db
new = cls(*values)
File "/home/develop21/projects/eds_vodokanal_rnd/.venv/lib/python3.6/site-packages/django/db/models/base.py", line 497, in __init__
post_init.send(sender=cls, instance=self)
File "/home/develop21/projects/eds_vodokanal_rnd/.venv/lib/python3.6/site-packages/django/dispatch/dispatcher.py", line 178, in send
forreceiverin self._live_receivers(sender)
File "/home/develop21/projects/eds_vodokanal_rnd/.venv/lib/python3.6/site-packages/django/dispatch/dispatcher.py", line 178, in<listcomp>forreceiverin self._live_receivers(sender)
File "/home/develop21/projects/eds_vodokanal_rnd/.venv/lib/python3.6/site-packages/fieldsignals/signals.py", line 79, in post_init_closure
self.get_and_update_changed_fields(receiver, instance, fields)
File "/home/develop21/projects/eds_vodokanal_rnd/.venv/lib/python3.6/site-packages/fieldsignals/signals.py", line 137, in get_and_update_changed_fields
if field.attname in deferred_fields:
AttributeError: 'GenericForeignKey' object has no attribute 'attname'
Hi, i use GenericForeignKey in my project and get the following error:
The text was updated successfully, but these errors were encountered: