Fix Mark Image form can not open when have invalid metadata

Now if there are have the invalid image metadata, can not open the
'Mark Image' form.

This patch fix it.

Change-Id: Iff3f9cc64499961c5d4a074cf26ecf823cc57d0d
Closes-Bug: #1654919
This commit is contained in:
zhurong 2017-01-09 11:23:51 +08:00
parent 5d189b92e5
commit 1b2ff3fa80
1 changed files with 3 additions and 3 deletions

View File

@ -38,9 +38,9 @@ def filter_murano_images(images, request=None):
LOG.warning(msg)
if request:
exceptions.handle(request, msg)
else:
image.title = metadata.get('title', 'No Title')
image.type = metadata.get('type', 'No Type')
metadata = {}
image.title = metadata.get('title', 'No Title')
image.type = metadata.get('type', 'No Type')
marked_images.append(image)
return marked_images