From edc3956cfdc2d48ff5ed3cafc2324b9c86077173 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ses=C3=B3stris=20Vieira?= Date: Fri, 12 Apr 2024 15:19:07 -0300 Subject: [PATCH] Corrige bug lista de casas atendidas para mostrar oficinas --- sigi/apps/servicos/views.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/sigi/apps/servicos/views.py b/sigi/apps/servicos/views.py index 8ab2820..154a96e 100644 --- a/sigi/apps/servicos/views.py +++ b/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.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.generic import ListView from import_export import resources @@ -79,7 +76,9 @@ class CasasAtendidasListView(ListView): Prefetch( "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( "convenio_set", queryset=Convenio.objects.select_related("projeto"),