Clear all session variables before loading DCLCalculatorPlugin

This commit is contained in:
PCoder 2018-10-05 10:37:23 +02:00
parent 5d9b2ee41a
commit 806726614e

View file

@ -9,6 +9,7 @@ from .cms_models import (
DCLSectionPromoPluginModel, DCLCalculatorPluginModel DCLSectionPromoPluginModel, DCLCalculatorPluginModel
) )
from .models import VMTemplate from .models import VMTemplate
from datacenterlight.utils import clear_all_session_vars
@plugin_pool.register_plugin @plugin_pool.register_plugin
@ -85,6 +86,7 @@ class DCLCalculatorPlugin(CMSPluginBase):
require_parent = True require_parent = True
def render(self, context, instance, placeholder): def render(self, context, instance, placeholder):
clear_all_session_vars(context['request'])
context = super(DCLCalculatorPlugin, self).render( context = super(DCLCalculatorPlugin, self).render(
context, instance, placeholder context, instance, placeholder
) )