Fix member list.

This commit is contained in:
Víðir Valberg Guðmundsson 2023-09-18 21:14:47 +02:00
parent f1c328a10c
commit 770c1c81b6

View file

@ -6,8 +6,9 @@ from django.core.paginator import Paginator
from django.db.models import Model from django.db.models import Model
from django.http import HttpRequest from django.http import HttpRequest
from django.http import HttpResponse from django.http import HttpResponse
from django.shortcuts import render
from django.urls import reverse from django.urls import reverse
from zen_queries import render from zen_queries import queries_disabled
@dataclass @dataclass
@ -70,11 +71,12 @@ def render_list(
rows = [] rows = []
for obj in objects: for obj in objects:
row = Row( with queries_disabled():
data={column: getattr(obj, column[0]) for column in columns}, row = Row(
actions=[action.render(obj) for action in row_actions], data={column: getattr(obj, column[0]) for column in columns},
) actions=[action.render(obj) for action in row_actions],
rows.append(row) )
rows.append(row)
context = { context = {
"rows": rows, "rows": rows,