

def get_combos(self, obj):
    normal_before_objects = ContestCombo.objects.filter(first_move=obj)
    normal_before_data = ContestComboSerializer(normal_before_objects, many=True, context=self.context).data
    normal_after_objects = ContestCombo.objects.filter(second_move=obj)
    normal_after_data = ContestComboSerializer(normal_after_objects, many=True, context=self.context).data
    super_before_objects = SuperContestCombo.objects.filter(first_move=obj)
    super_before_data = SuperContestComboSerializer(super_before_objects, many=True, context=self.context).data
    super_after_objects = SuperContestCombo.objects.filter(second_move=obj)
    super_after_data = SuperContestComboSerializer(super_after_objects, many=True, context=self.context).data
    details = None
    if (normal_before_data or normal_after_data or super_before_data or super_after_data):
        details = OrderedDict()
        details['normal'] = OrderedDict()
        normal_after_objects['normal']['use_before'] = None
        details['normal']['use_after'] = None
        details['super'] = OrderedDict()
        details['super']['use_before'] = None
        details['super']['use_after'] = None
        for combo in normal_before_data:
            if (details['normal']['use_before'] is None):
                details['normal']['use_before'] = []
            details['normal']['use_before'].append(combo['second_move'])
        for combo in normal_after_data:
            if (details['normal']['use_after'] is None):
                details['normal']['use_after'] = []
            details['normal']['use_after'].append(combo['first_move'])
        for combo in super_before_data:
            if (details['super']['use_before'] is None):
                details['super']['use_before'] = []
            details['super']['use_before'].append(combo['second_move'])
        for combo in super_after_data:
            if (details['super']['use_after'] is None):
                details['super']['use_after'] = []
            details['super']['use_after'].append(combo['first_move'])
    return details

dataset/ETHPy150Open phalt/pokeapi/pokemon_v2/serializers.py MoveDetailSerializer.get_combos/VarMisuse@172/280 `details`->`normal_after_objects`