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
ValueError: 'c_set__b' does not resolve to an item that supports prefetching - this is an invalid parameter to prefetch_related().
I debugged and found that when running the executing prefetch in Django, rel_obj_descriptor is tracker.DescriptorWrapper instead of ForwardManyToOneDescriptor which does not have the mehtod get_prefetch_queryset
The text was updated successfully, but these errors were encountered:
Problem
Running prefetch_related on a column which has a tracker will be failed with this error:
ValueError: "prefetch_related_field_name" does not resolve to an item that supports prefetching - this is an invalid parameter to prefetch_related().
Environment
Code examples
Given this code in models.py
This is the test case to reproduce the error:
and this is the error:
I debugged and found that when running the executing prefetch in Django, rel_obj_descriptor is
tracker.DescriptorWrapper
instead ofForwardManyToOneDescriptor
which does not have the mehtodget_prefetch_queryset
The text was updated successfully, but these errors were encountered: