diff --git a/promo/cms_plugins.py b/promo/cms_plugins.py index 5a78893..77ed74d 100644 --- a/promo/cms_plugins.py +++ b/promo/cms_plugins.py @@ -18,12 +18,14 @@ class PromoPluginPublisher(CMSPluginBase): promos = Promo.objects.filter(page_link_id__in=history).order_by('?') + context.update({'history': history}) + if promos.exists(): promo = promos[0] promo.text = promo.text.replace('#promo', promo.page_link.get_absolute_url()) context.update({ 'instance': promo, - 'history': history + }) return context