forked from 0x2620/pandora
events are case insensitive
This commit is contained in:
parent
e71421f597
commit
0de254984c
1 changed files with 2 additions and 2 deletions
|
@ -72,9 +72,9 @@ class Event(models.Model):
|
||||||
q = q|Q(value__icontains=" " + name)|Q(value__startswith=name)
|
q = q|Q(value__icontains=" " + name)|Q(value__startswith=name)
|
||||||
matches = []
|
matches = []
|
||||||
for a in Annotation.objects.filter(q):
|
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):
|
for name in [self.name] + list(self.alternativeNames):
|
||||||
if name in words:
|
if name.lower() in words:
|
||||||
matches.append(a.id)
|
matches.append(a.id)
|
||||||
break
|
break
|
||||||
if not matches:
|
if not matches:
|
||||||
|
|
Loading…
Reference in a new issue