From 1e97d0ba380a382a92f6e76a6e2014fb84b36141 Mon Sep 17 00:00:00 2001 From: Arvind Tiwari Date: Fri, 20 Apr 2018 17:51:46 +0530 Subject: [PATCH] Update cms_plugins.py --- datacenterlight/cms_plugins.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/datacenterlight/cms_plugins.py b/datacenterlight/cms_plugins.py index 6533adc7..19dc0b39 100644 --- a/datacenterlight/cms_plugins.py +++ b/datacenterlight/cms_plugins.py @@ -89,10 +89,12 @@ class DCLCalculatorPlugin(CMSPluginBase): context, instance, placeholder ) context['templates'] = VMTemplate.objects.all() - context['children_to_side'] = [] context['children_to_content'] = [] pricing_plugin_model = None - if instance.child_plugin_instances: + if instance.child_plugin_instances is not None: + context['children_to_content'].extend( + instance.child_plugin_instances + ) for child in instance.child_plugin_instances: if child.__class__.__name__ == 'DCLCustomPricingModel': # The second clause is just to make sure we pick up the @@ -108,10 +110,6 @@ class DCLCalculatorPlugin(CMSPluginBase): else: context['vm_pricing'] = VMPricing.get_default_pricing() - if instance.child_plugin_instances is not None: - context['children_to_content'].extend( - instance.child_plugin_instances - ) return context