From 1b2ff3fa804fe21dfbd2f742ffdb43a3759981e7 Mon Sep 17 00:00:00 2001 From: zhurong Date: Mon, 9 Jan 2017 11:23:51 +0800 Subject: [PATCH] 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 --- muranodashboard/images/forms.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/muranodashboard/images/forms.py b/muranodashboard/images/forms.py index ae0e54941..543f70920 100644 --- a/muranodashboard/images/forms.py +++ b/muranodashboard/images/forms.py @@ -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