MattBroach / DjangoRestMultipleModels

View (and mixin) for serializing multiple models or querysets in Django Rest Framework
MIT License
549 stars 67 forks source link

Nested relationships GenericRelatedObjectManager object is not JSON serializable #19

Closed awolfmann closed 8 years ago

awolfmann commented 8 years ago

I have a nested relationship defined as here: http://www.django-rest-framework.org/api-guide/relations/#nested-relationships

When i use MultipleModelAPIView i'm getting TypeError: GenericRelatedObjectManager object is not JSON serializable, but the same serializers works fine in the generics.ListAPIView, and viewsets.ModelViewSet

Any idea?

MattBroach commented 8 years ago

Hey @awolfmann: I noticed you closed this pretty soon after opening it. I just wanted to check to make sure you actually got your problem sorted out!

awolfmann commented 8 years ago

Hey @MattBroach thanks for writing! Yes, after just some hours i have opened the issue, i fixed the problem, it was my mistake with some of the serializers i used on the view.

Thanks again!

MattBroach commented 8 years ago

Cool! Glad you got it sorted out.