Merge pull request #641 from pcoder/bugfix/flake8_error

Attempt to fix flake8 error
This commit is contained in:
Pcoder 2018-06-27 09:17:11 +02:00 committed by GitHub
commit a56b2d02c8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -3,6 +3,7 @@ from cms.extensions.extension_pool import extension_pool
from cms.models.fields import PlaceholderField
from cms.models.pluginmodel import CMSPlugin
from django import forms
from django.conf import settings
from django.contrib.postgres.fields import ArrayField
from django.contrib.sites.models import Site
from django.db import models
@ -300,6 +301,8 @@ class MultipleChoiceArrayField(ArrayField):
Uses Django's Postgres ArrayField
and a MultipleChoiceField for its formfield.
"""
VMTemplateChoices = []
if settings.OPENNEBULA_DOMAIN != 'test_domain':
VMTemplateChoices = list(
(
str(obj.opennebula_vm_template_id),