Browse Source

Corrige bug lista de casas atendidas para mostrar oficinas

pull/173/head
Sesóstris Vieira 9 months ago
parent
commit
edc3956cfd
  1. 7
      sigi/apps/servicos/views.py

7
sigi/apps/servicos/views.py

@ -1,8 +1,5 @@
import csv
from django.db.models import Q, Prefetch, Count, F, Value, Case, When from django.db.models import Q, Prefetch, Count, F, Value, Case, When
from django.http import HttpResponse from django.http import HttpResponse
from django.shortcuts import render
from django.utils.translation import gettext as _
from django.views.decorators.clickjacking import xframe_options_exempt from django.views.decorators.clickjacking import xframe_options_exempt
from django.views.generic import ListView from django.views.generic import ListView
from import_export import resources from import_export import resources
@ -79,7 +76,9 @@ class CasasAtendidasListView(ListView):
Prefetch( Prefetch(
"servico_set", queryset=sq_servicos, to_attr="servicos" "servico_set", queryset=sq_servicos, to_attr="servicos"
), ),
Prefetch("evento_set", queryset=sq_eventos, to_attr="eventos"), Prefetch(
"evento_set", queryset=sq_eventos, to_attr="oficinas"
),
Prefetch( Prefetch(
"convenio_set", "convenio_set",
queryset=Convenio.objects.select_related("projeto"), queryset=Convenio.objects.select_related("projeto"),

Loading…
Cancel
Save