Merge "Fix the active attribute check"

This commit is contained in:
Jenkins 2016-05-11 07:06:25 +00:00 committed by Gerrit Code Review
commit d30fa116b2
3 changed files with 3 additions and 2 deletions

View File

@ -183,7 +183,7 @@ class LaunchForm(forms.SelfHandlingForm):
versions = self.datastore_versions(request, ds.name)
for version in versions:
if version.name == "inactive":
if hasattr(version, 'active') and not version.active:
continue
valid_flavor = self.datastore_flavors(request, ds.name,
versions[0].name)

View File

@ -120,6 +120,8 @@ class SetInstanceDetailsAction(workflows.Action):
# only add to choices if datastore has at least one version
version_choices = ()
for v in versions:
if hasattr(v, 'active') and not v.active:
continue
version_choices = (version_choices +
((ds.name + ',' + v.name, v.name),))
datastore_choices = (ds.name, version_choices)

View File

@ -311,7 +311,6 @@ VERSION_TWO = {
"name": "5.6",
"links": [],
"image": "c7956bb5-920e-4299-b68e-2347d830d938",
"active": 1,
"datastore": "537fb940-b5eb-40d9-bdbd-91a3dcb9c17d",
"packages": "5.6",
"id": "500a6d52-8347-4e00-8e4c-f4fa9cf96ae9"