Django Rest Framework nested serializer returns empty list

237 views
Skip to first unread message

Lodger Mtui

unread,
Mar 29, 2023, 3:28:17 AM3/29/23
to Django REST framework
Hello, 

I have a problem that I stuck on for sometimes now. I have two models with their respective serializers, these models have @property functions.

The idea is to create API endpoints from one model special for posting data and another one to get/retrieve data from the other model.

I manage to post using this endpoint, but if I want to get from other endpoint, it returns an empty list.

I have posted the source code on Stack Overflow as shown in the link below:-

Regards,
Lodger
Reply all
Reply to author
Forward
0 new messages