Merge pull request #641 from pcoder/bugfix/flake8_error
Attempt to fix flake8 error
This commit is contained in:
		
				commit
				
					
						a56b2d02c8
					
				
			
		
					 1 changed files with 11 additions and 8 deletions
				
			
		| 
						 | 
					@ -3,6 +3,7 @@ from cms.extensions.extension_pool import extension_pool
 | 
				
			||||||
from cms.models.fields import PlaceholderField
 | 
					from cms.models.fields import PlaceholderField
 | 
				
			||||||
from cms.models.pluginmodel import CMSPlugin
 | 
					from cms.models.pluginmodel import CMSPlugin
 | 
				
			||||||
from django import forms
 | 
					from django import forms
 | 
				
			||||||
 | 
					from django.conf import settings
 | 
				
			||||||
from django.contrib.postgres.fields import ArrayField
 | 
					from django.contrib.postgres.fields import ArrayField
 | 
				
			||||||
from django.contrib.sites.models import Site
 | 
					from django.contrib.sites.models import Site
 | 
				
			||||||
from django.db import models
 | 
					from django.db import models
 | 
				
			||||||
| 
						 | 
					@ -300,15 +301,17 @@ class MultipleChoiceArrayField(ArrayField):
 | 
				
			||||||
    Uses Django's Postgres ArrayField
 | 
					    Uses Django's Postgres ArrayField
 | 
				
			||||||
    and a MultipleChoiceField for its formfield.
 | 
					    and a MultipleChoiceField for its formfield.
 | 
				
			||||||
    """
 | 
					    """
 | 
				
			||||||
    VMTemplateChoices = list(
 | 
					    VMTemplateChoices = []
 | 
				
			||||||
        (
 | 
					    if settings.OPENNEBULA_DOMAIN != 'test_domain':
 | 
				
			||||||
            str(obj.opennebula_vm_template_id),
 | 
					        VMTemplateChoices = list(
 | 
				
			||||||
            (obj.name + ' - ' + VMTemplate.IPV6.title()
 | 
					            (
 | 
				
			||||||
                if obj.vm_type == VMTemplate.IPV6 else obj.name
 | 
					                str(obj.opennebula_vm_template_id),
 | 
				
			||||||
 | 
					                (obj.name + ' - ' + VMTemplate.IPV6.title()
 | 
				
			||||||
 | 
					                    if obj.vm_type == VMTemplate.IPV6 else obj.name
 | 
				
			||||||
 | 
					                 )
 | 
				
			||||||
             )
 | 
					             )
 | 
				
			||||||
         )
 | 
					            for obj in VMTemplate.objects.all()
 | 
				
			||||||
        for obj in VMTemplate.objects.all()
 | 
					        )
 | 
				
			||||||
    )
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def formfield(self, **kwargs):
 | 
					    def formfield(self, **kwargs):
 | 
				
			||||||
        defaults = {
 | 
					        defaults = {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue