dont use CONFIG['keys']
This commit is contained in:
parent
d0a1b9d4c6
commit
104292cba8
2 changed files with 2 additions and 2 deletions
|
@ -42,7 +42,7 @@ def parseCondition(condition, user, owner=None):
|
||||||
exclude = False
|
exclude = False
|
||||||
|
|
||||||
facet_keys = models.Item.facet_keys + ['title']
|
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):
|
if isinstance(key_type, list):
|
||||||
key_type = key_type[0]
|
key_type = key_type[0]
|
||||||
key_type = {
|
key_type = {
|
||||||
|
|
|
@ -317,7 +317,7 @@ def autocomplete(request):
|
||||||
data['range'] = [0, 10]
|
data['range'] = [0, 10]
|
||||||
op = data.get('operator', '=')
|
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)
|
order_by = key.get('autocompleteSort', False)
|
||||||
if order_by:
|
if order_by:
|
||||||
for o in order_by:
|
for o in order_by:
|
||||||
|
|
Loading…
Reference in a new issue