forked from 0x2620/pandora
dont look over places/events if empty annotation
This commit is contained in:
parent
80cb9c8faf
commit
558306a629
1 changed files with 28 additions and 26 deletions
|
@ -23,6 +23,7 @@ def update_matching_events(id):
|
||||||
for e in a.events.all():
|
for e in a.events.all():
|
||||||
e.update_matches()
|
e.update_matches()
|
||||||
|
|
||||||
|
if a.findvalue:
|
||||||
names = {}
|
names = {}
|
||||||
for n in Event.objects.all().values('id', 'name', 'alternativeNames'):
|
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'])]
|
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():
|
for p in a.places.all():
|
||||||
p.update_matches()
|
p.update_matches()
|
||||||
|
|
||||||
|
if a.findvalue:
|
||||||
names = {}
|
names = {}
|
||||||
for n in Place.objects.all().values('id', 'name', 'alternativeNames'):
|
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'])]
|
names[n['id']] = [ox.decodeHtml(x) for x in [n['name']] + json.loads(n['alternativeNames'])]
|
||||||
|
|
Loading…
Reference in a new issue