Skip to content

Commit

Permalink
Merge pull request #469 from turicas/fix/socio-field
Browse files Browse the repository at this point in the history
Utiliza apenas colunas disponíveis em Socio
  • Loading branch information
turicas authored Oct 7, 2020
2 parents a185eff + beeb491 commit aa2b0a3
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions core/views_special.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,11 +138,7 @@ def document_detail(request, document):
"-data_pagamento"
)
elif is_person:
companies_data = (
Socio.objects.filter(nome_socio=unaccent(obj.name))
.distinct("cnpj", "razao_social")
.order_by("razao_social")
)
companies_data = Socio.objects.filter(nome_socio=unaccent(obj.name)).distinct("cnpj").order_by("cnpj")
# TODO: filter by CPF also
applications_data = Candidatos.objects.filter(cpf_candidato=obj.document)
filiations_data = FiliadosPartidos.objects.filter(nome_do_filiado=unaccent(obj.name))
Expand Down

0 comments on commit aa2b0a3

Please sign in to comment.