drf-compound-fields icon indicating copy to clipboard operation
drf-compound-fields copied to clipboard

Doesn't work for `RelatedField` and subclasses.

Open mrmachine opened this issue 9 years ago • 3 comments

The isinstance(..., list) check fails on queryset/manager values and so the repr of the queryset/manager object is displayed as a single object instead of showing a list of objects.

The advice is probably to just use RelatedField, but the reason for wanting to use ListOrItemField is to allow older API clients which are expecting to set and get a single value to do so without making any changes.

mrmachine avatar Mar 19 '15 03:03 mrmachine

Please see #27

estebistec avatar Apr 05 '15 06:04 estebistec

We are not using DRF3 in our project. Are you saying that this issue would only be fixed in an updated version of DRF-compound-fields that works with DRF3?

mrmachine avatar Apr 06 '15 08:04 mrmachine

Given my limited amount of time, DRF3 is at least where I'm solving these problems first. Of course I'll keep a maintenance branch open to accept pull requests on for DRF2.X fixes.

estebistec avatar Apr 06 '15 13:04 estebistec