From 104292cba83e075e3472bf8d448f4e5a3f723295 Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Thu, 17 Oct 2013 15:04:21 +0000 Subject: [PATCH] dont use CONFIG['keys'] --- pandora/item/managers.py | 2 +- pandora/item/views.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pandora/item/managers.py b/pandora/item/managers.py index 4ce60c534..f00932667 100644 --- a/pandora/item/managers.py +++ b/pandora/item/managers.py @@ -42,7 +42,7 @@ def parseCondition(condition, user, owner=None): exclude = False facet_keys = models.Item.facet_keys + ['title'] - key_type = settings.CONFIG['keys'].get(k, {'type':'string'}).get('type') + key_type = (utils.get_by_id(settings.CONFIG['itemKeys'], k) or {'type': 'string'}).get('type') if isinstance(key_type, list): key_type = key_type[0] key_type = { diff --git a/pandora/item/views.py b/pandora/item/views.py index fa8b56763..f40fc9114 100644 --- a/pandora/item/views.py +++ b/pandora/item/views.py @@ -317,7 +317,7 @@ def autocomplete(request): data['range'] = [0, 10] op = data.get('operator', '=') - key = settings.CONFIG['keys'][data['key']] + key = utils.get_by_id(settings.CONFIG['itemKeys'], data['key']) order_by = key.get('autocompleteSort', False) if order_by: for o in order_by: