dont look over places/events if empty annotation

This commit is contained in:
j 2012-03-10 02:33:03 +01:00
parent 80cb9c8faf
commit 558306a629

View file

@ -23,6 +23,7 @@ def update_matching_events(id):
for e in a.events.all():
e.update_matches()
if a.findvalue:
names = {}
for n in Event.objects.all().values('id', 'name', 'alternativeNames'):
names[n['id']] = [ox.decodeHtml(x) for x in [n['name']] + json.loads(n['alternativeNames'])]
@ -52,6 +53,7 @@ def update_matching_places(id):
for p in a.places.all():
p.update_matches()
if a.findvalue:
names = {}
for n in Place.objects.all().values('id', 'name', 'alternativeNames'):
names[n['id']] = [ox.decodeHtml(x) for x in [n['name']] + json.loads(n['alternativeNames'])]