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
Wrapping the ValuesQuerySet in a list() call fixes the problem.
The DRF docs mention that Response() objects should only be given Python primitives so I understand that this specific usage may not (and possibly should not) be supported.
It is however unexpected that the behaviour differs from DRF's standard JSON renderer which iterates correctly over ValuesQuerySets.
Thoughts?
The text was updated successfully, but these errors were encountered:
Hi
I noticed one of our endpoints breaks when outputting as xml but works fine when using the DRF json renderer.
It outputs something like this:
With an endpoint similar to this:
Wrapping the ValuesQuerySet in a
list()
call fixes the problem.The DRF docs mention that Response() objects should only be given Python primitives so I understand that this specific usage may not (and possibly should not) be supported.
It is however unexpected that the behaviour differs from DRF's standard JSON renderer which iterates correctly over ValuesQuerySets.
Thoughts?
The text was updated successfully, but these errors were encountered: