Handle non-existent resources in list during update
When showing the resource list during a stack update, the patch
5ce238fb17
inadvertently raises a KeyError
when a resource in the new template hasn't been created yet. This resolves
the problem.
Change-Id: If0784156211b21d8ef7047a7082d1b48e977252d
Related-Bug: #1703703
Closes-Bug: #1705170
This commit is contained in:
parent
51b5f6c18f
commit
65630d4e8b
|
@ -373,8 +373,8 @@ class Stack(collections.Mapping):
|
|||
tid = self.t.id
|
||||
|
||||
if tid == self.t.id:
|
||||
cur_res = self.resources[db_res.name]
|
||||
if cur_res.id == db_res.id:
|
||||
cur_res = self.resources.get(db_res.name)
|
||||
if cur_res is not None and (cur_res.id == db_res.id):
|
||||
return cur_res
|
||||
|
||||
if rsrc_def_cache and tid in rsrc_def_cache:
|
||||
|
|
Loading…
Reference in New Issue