general: do not preload tile cells when rendering cell (#54882)

This commit is contained in:
Frédéric Péters 2021-06-15 12:28:59 +02:00
parent f5918c45da
commit 65da4dd24e
1 changed files with 5 additions and 1 deletions

View File

@ -180,7 +180,11 @@ def render_cell(request, cell):
if cell.page_id:
other_cells = []
for klass in CellBase.get_cell_classes(lambda x: bool(x.modify_global_context)):
other_cells.extend(klass.objects.filter(page_id=cell.page_id))
other_cells.extend(
klass.objects.filter(page_id=cell.page_id).exclude(
placeholder__in=['_auto_tile', '_dashboard', '_suggested_tile']
)
)
other_cells = [x for x in other_cells if x.is_visible(user=request.user)]
other_cells.sort(key=lambda x: x.order)
for other_cell in other_cells: