Closed Javedgouri closed 2 years ago
I'd love for this to get fixed - unfortunately I don't have a lot of time to dedicate to this project currently. Pull requests are very welcome.
I recently stumbled over this. Couldn't one simply do
select_related = [s.replace('.', '__') for s in select_related]
prefetch_related = [s.replace('.', '__') for s in prefetch_related]
I tried this out locally and it seemed to work, but I'm not sure it won't break in other places.
Yeah that could probably work - we have a reasonably extensive test suite so if you want to submit a PR we should be able to see if it actually breaks anything :)
Sure, why not:
Awesome.
0.2.11
on PyPi should have this change.
dotted notation to traverse attributes are not working
user_platforms = UserPlatformSerializer(source='user.user_platforms', read_only=True, many=True)
AttributeError: Cannot find 'user.user_platforms' on Artist object, 'user.user_platformsplatformlogo' is an invalid parameter to prefetch_related()