[Sahara] Fixed copy nodegroup template when sec groups missing

'security_groups' is not required field. So, we should handle
None value.

Change-Id: I0233a0e247912f3f8f34f1c85e833eee4b1aa8f8
Closes-Bug: #1418278
This commit is contained in:
Andrew Lazarev 2015-02-04 17:44:24 -08:00
parent 59c57a16f0
commit 4da82b5acf
1 changed files with 3 additions and 2 deletions

View File

@ -70,8 +70,9 @@ class CopyNodegroupTemplate(create_flow.ConfigureNodegroupTemplate):
s_fields["security_autogroup"].initial = template.auto_security_group
s_fields["security_groups"].initial = dict(
[(sg, sg) for sg in template.security_groups])
if template.security_groups:
s_fields["security_groups"].initial = dict(
[(sg, sg) for sg in template.security_groups])
processes_dict = dict()
try: