<commit_before>from pprint import pprint 

from django.contrib.auth.decorators import permission_required
from django.http import JsonResponse

from fo2.connections import db_cursor_so

from utils.views import request_hash_trail

import estoque.classes
from estoque import queries


@permission_required('base.can_adjust_stock')
def executa_ajuste(request, **kwargs):
    data = {}

    dep = kwargs['dep']
    ref = kwargs['ref']
    cor = kwargs['cor']
    tam = kwargs['tam']
    ajuste = kwargs['ajuste']
    num_doc = kwargs['num_doc']
    trail = kwargs['trail']

    if dep not in ['101', '102', '231']:
        data.update({
            'result': 'ERR',
            'descricao_erro': 'Depósito inválido',
        })
        return JsonResponse(data, safe=False)
<commit_msg>ajax executa_ajuste passa a aceitar depósito 122<commit_after>from pprint import pprint 

from django.contrib.auth.decorators import permission_required
from django.http import JsonResponse

from fo2.connections import db_cursor_so

from utils.views import request_hash_trail

import estoque.classes
from estoque import queries


@permission_required('base.can_adjust_stock')
def executa_ajuste(request, **kwargs):
    data = {}

    dep = kwargs['dep']
    ref = kwargs['ref']
    cor = kwargs['cor']
    tam = kwargs['tam']
    ajuste = kwargs['ajuste']
    num_doc = kwargs['num_doc']
    trail = kwargs['trail']

    if dep not in ['101', '102', '231', '122']:
        data.update({
            'result': 'ERR',
            'descricao_erro': 'Depósito inválido',
        })
        return JsonResponse(data, safe=False)

{'fraction_non_alphanumeric': 0.11643835616438356, 'fraction_numerical': 0.0161892901618929, 'mean_word_length': 3.5395480225988702, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6701481', 'n_tokens_mistral': 532, 'n_tokens_neox': 520, 'n_words': 129}