From 81aa990988ac612800bde68a8c3289dff0b51843 Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Sun, 9 Feb 2014 09:41:34 +0000 Subject: [PATCH] string layers are facets too, to fix exact matches --- pandora/item/models.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pandora/item/models.py b/pandora/item/models.py index 4b4cc87a3..32fd43955 100644 --- a/pandora/item/models.py +++ b/pandora/item/models.py @@ -1458,6 +1458,10 @@ for key in settings.CONFIG['itemKeys']: if 'autocomplete' in key and not 'autocompleteSortKey' in key or \ key.get('filter'): Item.facet_keys.append(key['id']) + elif key.get('type') == 'layer' and \ + utils.get_by_id(settings.CONFIG['layers'], key['id']).get('type') == 'string': + Item.facet_keys.append(key['id']) + Item.person_keys = [] for key in settings.CONFIG['itemKeys']: