Can we select which object to return from serializer[many=true] based on condition #8694
Unanswered
aryaraj132
asked this question in
Question & Answer
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Lets suppose i have a model Post with field such as
Now the query
post_obj = Post.objects.all()
return 10 objects which is passed to getPostDataSerializer()we have
which returns name, body and permission_set of all 10 objects but i want to receive data of only those posts which have certain permissions which is extracted in serializer itself
Please help
Beta Was this translation helpful? Give feedback.
All reactions