places too
This commit is contained in:
parent
4969719231
commit
2ae9035a37
2 changed files with 5 additions and 5 deletions
|
@ -130,7 +130,7 @@ class Annotation(models.Model):
|
||||||
layer = self.get_layer()
|
layer = self.get_layer()
|
||||||
if self.value:
|
if self.value:
|
||||||
self.value = utils.cleanup_value(self.value, layer['type'])
|
self.value = utils.cleanup_value(self.value, layer['type'])
|
||||||
self.findvalue = ox.decodeHtml(ox.stripTags(self.value).strip()).replace('\n ', ' ')
|
self.findvalue = ox.decodeHtml(ox.stripTags(self.value).strip()).replace('\n', ' ')
|
||||||
sortvalue = sort_string(self.findvalue)
|
sortvalue = sort_string(self.findvalue)
|
||||||
if sortvalue:
|
if sortvalue:
|
||||||
self.sortvalue = sortvalue[:900]
|
self.sortvalue = sortvalue[:900]
|
||||||
|
|
|
@ -25,9 +25,9 @@ def update_matching_events(id):
|
||||||
|
|
||||||
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(n) for n in [n['name']] + json.loads(n['alternativeNames'])]
|
names[n['id']] = [ox.decodeHtml(x) for x in [n['name']] + json.loads(n['alternativeNames'])]
|
||||||
|
|
||||||
value = a.findvalue.lower().replace('\n', ' ')
|
value = a.findvalue.lower()
|
||||||
update = []
|
update = []
|
||||||
for i in names:
|
for i in names:
|
||||||
for name in names[i]:
|
for name in names[i]:
|
||||||
|
@ -54,8 +54,8 @@ def update_matching_places(id):
|
||||||
|
|
||||||
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']] = [n['name']] + json.loads(n['alternativeNames'])
|
names[n['id']] = [ox.decodeHtml(x) for x in [n['name']] + json.loads(n['alternativeNames'])]
|
||||||
value = a.value.lower()
|
value = a.findvalue.lower()
|
||||||
update = []
|
update = []
|
||||||
for i in names:
|
for i in names:
|
||||||
for name in names[i]:
|
for name in names[i]:
|
||||||
|
|
Loading…
Reference in a new issue