Refactor show_vm_templates to DCLCalculatorPluginModel from VMPricing

This commit is contained in:
PCoder 2018-06-24 09:08:22 +02:00
commit 79e83b4480
5 changed files with 67 additions and 60 deletions

View file

@ -88,7 +88,7 @@ class DCLCalculatorPlugin(CMSPluginBase):
context = super(DCLCalculatorPlugin, self).render(
context, instance, placeholder
)
ids = instance.pricing.vm_templates_to_show
ids = instance.vm_templates_to_show
if ids:
context['templates'] = VMTemplate.objects.filter(
vm_type=instance.vm_type