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.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,