79307824

Date: 2024-12-25 15:05:27
Score: 1.5
Natty:
Report link

My problem was in not using source for my LineupSerializer. After adding this the problem got solved and the serialised had access to all objects, including foreign keys in my models:

class LineupSerializer(serializers.ModelSerializer):
    players = LineupPlayerSerializer(source='lineup',many=True)
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Robo Gore