cleanup use of python-ox api
This commit is contained in:
parent
5aac6ebe22
commit
69b1e6c7b2
10 changed files with 25 additions and 25 deletions
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue