Merge "Bug fix: showing a deleted template."

This commit is contained in:
Zuul 2019-04-08 19:50:07 +00:00 committed by Gerrit Code Review
commit 5f9d39b2ff
1 changed files with 1 additions and 1 deletions

View File

@ -136,7 +136,7 @@ class TemplateController(RootRestController):
def _show_template(uuid): def _show_template(uuid):
try: try:
templates = pecan.request.storage.templates.query(uuid=uuid) 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) raise VitrageError("Template %s not found", uuid)
return templates[0].file_content return templates[0].file_content
except Exception: except Exception: