forked from 0x2620/pandora
fix get_matches
This commit is contained in:
parent
771cec5779
commit
d6b9929052
3 changed files with 4 additions and 5 deletions
|
@ -69,8 +69,8 @@ class Event(models.Model):
|
|||
return False
|
||||
|
||||
def get_matches(self):
|
||||
layers = filter(lambda l: l['type'] == 'event' or l.get('hasEvents'),
|
||||
settings.CONFIG['layers'])
|
||||
layers = [l['id'] for l in filter(lambda l: l['type'] == 'event' or l.get('hasEvents'),
|
||||
settings.CONFIG['layers'])]
|
||||
super_matches = []
|
||||
q = Q(name_find__contains=" " + self.name)|Q(name_find__contains="|%s"%self.name)
|
||||
for name in self.alternativeNames:
|
||||
|
|
|
@ -83,8 +83,8 @@ class Place(models.Model):
|
|||
return j
|
||||
|
||||
def get_matches(self):
|
||||
layers = filter(lambda l: l['type'] == 'place' or l.get('hasPlaces'),
|
||||
settings.CONFIG['layers'])
|
||||
layers = [l['id'] for l in filter(lambda l: l['type'] == 'place' or l.get('hasPlaces'),
|
||||
settings.CONFIG['layers'])]
|
||||
super_matches = []
|
||||
q = Q(name_find__contains=" " + self.name)|Q(name_find__contains="|%s"%self.name)
|
||||
for name in self.alternativeNames:
|
||||
|
|
|
@ -22,7 +22,6 @@ from item.models import Access, Item
|
|||
from item import utils
|
||||
|
||||
import models
|
||||
import managers
|
||||
|
||||
|
||||
def signin(request):
|
||||
|
|
Loading…
Reference in a new issue