Bug fix: showing a deleted template.
Story: 2005091 Task: 29691 Depends-On: https://review.openstack.org/#/c/649335/ Depends-On: Ib20a24b97709d0d4fe9b35e0c21319407ed3aab1 Change-Id: Idb121516a50aeb1db0859f1a09a390fadec09e74
This commit is contained in:
parent
302c483bf2
commit
db93737bd3
|
@ -136,7 +136,7 @@ class TemplateController(RootRestController):
|
|||
def _show_template(uuid):
|
||||
try:
|
||||
templates = pecan.request.storage.templates.query(uuid=uuid)
|
||||
if not templates:
|
||||
if not templates or templates[0].status == TStatus.DELETED:
|
||||
raise VitrageError("Template %s not found", uuid)
|
||||
return templates[0].file_content
|
||||
except Exception:
|
||||
|
|
Loading…
Reference in New Issue