find clip queries too

This commit is contained in:
j 2012-11-18 20:41:18 +01:00
parent 73cbde63cf
commit 066d7c8588

View file

@ -159,7 +159,10 @@ class ClipManager(Manager):
'^': '__istartswith', '^': '__istartswith',
'$': '__iendswith', '$': '__iendswith',
}.get(condition.get('opterator', ''), '__icontains')) }.get(condition.get('opterator', ''), '__icontains'))
q = Q(**{key: condition['value']}) v = condition['value']
if isinstance(v, unicode):
v = unicodedata.normalize('NFKD', v).lower()
q = Q(**{key: v})
if condition['key'] in settings.CONFIG['clipLayers']: if condition['key'] in settings.CONFIG['clipLayers']:
q = q & Q(layer=condition['key']) q = q & Q(layer=condition['key'])
return q return q