Validate role using its api method
Change-Id: I188dc41b484f2e219d62af6631a703111fe67adf
This commit is contained in:
parent
da5e913019
commit
27146ec802
@ -149,11 +149,8 @@ class IndexView(views.IndexView):
|
|||||||
if field:
|
if field:
|
||||||
field.initial = 0
|
field.initial = 0
|
||||||
free_roles.append(role)
|
free_roles.append(role)
|
||||||
# For now, role is valid if it has image.
|
role['is_valid'] = role[
|
||||||
if role['role'].image:
|
'role'].is_valid_for_deployment(data['plan'])
|
||||||
role['is_valid'] = True
|
|
||||||
else:
|
|
||||||
role['is_valid'] = False
|
|
||||||
data['free_roles'] = free_roles
|
data['free_roles'] = free_roles
|
||||||
flavor_data = list(
|
flavor_data = list(
|
||||||
_flavor_data(self.request, flavors, flavor_roles))
|
_flavor_data(self.request, flavors, flavor_roles))
|
||||||
|
Loading…
Reference in New Issue
Block a user