From 2812834ce3dc4794ed23b91fb56996fa323bed75 Mon Sep 17 00:00:00 2001 From: Will Thompson Date: Fri, 29 Apr 2016 10:56:00 +0100 Subject: [PATCH] findAnnotations: don't lowercase ids (fixes #2916) Without this fix, a condition like: {key: 'id', operator: '==', value: 'A/B'} gets mapped to: public_id__exact=('A/B'.lower()) which is wrong. I introduced this bug in b3df5b8. I didn't catch it because I was mostly interested in the 'layer' key -- but layer names are conventionally lowercase anyway so lowercasing them had no effect. --- pandora/annotation/managers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora/annotation/managers.py b/pandora/annotation/managers.py index f76127da..798433bc 100644 --- a/pandora/annotation/managers.py +++ b/pandora/annotation/managers.py @@ -92,7 +92,7 @@ def parseCondition(condition, user): key = str(key) if isinstance(v, unicode): v = unicodedata.normalize('NFKD', v) - if v not in case_sensitive_keys: + if k not in case_sensitive_keys: v = v.lower() if exclude: q = ~Q(**{key: v})