From 066d7c8588d70a33690e300cc181c10748b64a55 Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Sun, 18 Nov 2012 20:41:18 +0100 Subject: [PATCH] find clip queries too --- pandora/clip/managers.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pandora/clip/managers.py b/pandora/clip/managers.py index a7fe0ec6..140fea9d 100644 --- a/pandora/clip/managers.py +++ b/pandora/clip/managers.py @@ -159,7 +159,10 @@ class ClipManager(Manager): '^': '__istartswith', '$': '__iendswith', }.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']: q = q & Q(layer=condition['key']) return q