How do I return only selected fields from the model and its relation

Can you provide your error traceback?