events are case insensitive

This commit is contained in:
j 2011-10-30 14:01:03 +01:00
parent e71421f597
commit 0de254984c

View file

@ -72,9 +72,9 @@ class Event(models.Model):
q = q|Q(value__icontains=" " + name)|Q(value__startswith=name)
matches = []
for a in Annotation.objects.filter(q):
words = ox.words(a.value)
words = ox.words(a.value.lower())
for name in [self.name] + list(self.alternativeNames):
if name in words:
if name.lower() in words:
matches.append(a.id)
break
if not matches: