From 151e1e093c42c2133351cd266b8b1f41b5c34526 Mon Sep 17 00:00:00 2001 From: Ana Krivokapic Date: Thu, 15 Jan 2015 17:37:52 +0100 Subject: [PATCH] Correctly display role-flavor association Role/flavor association wasn't correctly displayed on the overview page. Change-Id: I7d64f9444911f6e9fbcb810806231f2ef5c5710e --- tuskar_boxes/overview/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tuskar_boxes/overview/views.py b/tuskar_boxes/overview/views.py index 11fb69c..08f8f72 100644 --- a/tuskar_boxes/overview/views.py +++ b/tuskar_boxes/overview/views.py @@ -139,7 +139,7 @@ class IndexView(views.IndexView): if 'form' in data: role['flavor_field'] = data['form'][role['id'] + '-flavor'] flavor = role['role'].flavor(data['plan']) - if flavor in flavors: + if flavor and flavor.id in [f.id for f in flavors]: role['flavor_name'] = flavor.name flavor_roles.setdefault(flavor.name, []).append(role) else: