Browse Source

Corrigindo falha na geração de relatórios

0.3
Camilo Carlos (Estagiario) 15 years ago
parent
commit
8e35dd91da
  1. 4
      sigi/apps/convenios/views.py

4
sigi/apps/convenios/views.py

@ -9,12 +9,14 @@ def report(request, id=None):
qs = qs.filter(pk=id)
elif request.GET: #Se tiver algum parametro de pesquisa
kwargs = {}
ids = 0
for k, v in request.GET.iteritems():
kwargs[str(k)] = v
if(str(k)=='ids'):
ids = 1
break
qs = qs.filter(**kwargs)
if kwargs['ids']:
if ids:
query = 'id IN ('+ kwargs['ids'].__str__()+')'
qs = Convenio.objects.extra(where=[query])
if not qs:

Loading…
Cancel
Save