Make last commit more resilient

This commit is contained in:
Raphael Michel
2018-09-25 18:20:40 +02:00
parent feb262644e
commit 6e53990845
2 changed files with 2 additions and 2 deletions

View File

@@ -162,7 +162,7 @@ DEFAULT_VARIABLES = OrderedDict((
"evaluate": lambda op, order, ev: "<br/>".join([
'{} - {}'.format(p.item, p.variation) if p.variation else str(p.item)
for p in (
op.addons.all() if 'addons' in op._prefetched_objects_cache
op.addons.all() if 'addons' in getattr(op, '_prefetched_objects_cache', {})
else op.addons.select_related('item', 'variation')
)
])