

def get_moves_that_affect(self, obj):
    stat_change_objects = MoveMetaStatChange.objects.filter(stat=obj)
    stat_changes = MoveMetaStatChangeSerializer(stat_change_objects, many=True, context=self.context).data
    changes = OrderedDict([('increase', []), ('decrease', [])])
    for change in stat_changes:
        del change['stat']
        if (change['change'] > 0):
            changes['increase'].append(change)
        else:
            changes['decrease'].append(change)
    return changes

dataset/ETHPy150Open phalt/pokeapi/pokemon_v2/serializers.py StatDetailSerializer.get_moves_that_affect/original