From 770c1c81b6a4c156749f31536ad5ff2563c8c7f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=AD=C3=B0ir=20Valberg=20Gu=C3=B0mundsson?= Date: Mon, 18 Sep 2023 21:14:47 +0200 Subject: [PATCH] Fix member list. --- src/utils/view_utils.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/utils/view_utils.py b/src/utils/view_utils.py index e516f28..1c90922 100644 --- a/src/utils/view_utils.py +++ b/src/utils/view_utils.py @@ -6,8 +6,9 @@ from django.core.paginator import Paginator from django.db.models import Model from django.http import HttpRequest from django.http import HttpResponse +from django.shortcuts import render from django.urls import reverse -from zen_queries import render +from zen_queries import queries_disabled @dataclass @@ -70,11 +71,12 @@ def render_list( rows = [] for obj in objects: - row = Row( - data={column: getattr(obj, column[0]) for column in columns}, - actions=[action.render(obj) for action in row_actions], - ) - rows.append(row) + with queries_disabled(): + row = Row( + data={column: getattr(obj, column[0]) for column in columns}, + actions=[action.render(obj) for action in row_actions], + ) + rows.append(row) context = { "rows": rows,