assets: ignore cells from snapshots (#27948)

This commit is contained in:
Frédéric Péters 2018-11-13 16:29:29 +01:00
parent 167c78c795
commit 308d2f845d
1 changed files with 3 additions and 1 deletions

View File

@ -93,7 +93,9 @@ class SlotAsset(object):
assets = dict([(x.key, x) for x in Asset.objects.all()])
uniq_slots = {}
uniq_slots.update(settings.COMBO_ASSET_SLOTS)
for cell in CellBase.get_cells(cell_filter=lambda x: bool(x.get_asset_slots)):
for cell in CellBase.get_cells(
cell_filter=lambda x: bool(x.get_asset_slots),
page__snapshot__isnull=True):
uniq_slots.update(cell.get_asset_slots())
for key, value in uniq_slots.items():
yield cls(key,