cleanup use of python-ox api

This commit is contained in:
j 2012-05-27 13:52:12 +02:00
commit 69b1e6c7b2
10 changed files with 25 additions and 25 deletions

View file

@ -26,7 +26,7 @@ def update_matching_events(id):
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'])]
names[n['id']] = [ox.decode_html(x) for x in [n['name']] + json.loads(n['alternativeNames'])]
value = a.findvalue.lower()
update = []
@ -56,7 +56,7 @@ def update_matching_places(id):
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'])]
names[n['id']] = [ox.decode_html(x) for x in [n['name']] + json.loads(n['alternativeNames'])]
value = a.findvalue.lower()
update = []
for i in names: