fix save place
This commit is contained in:
parent
50bb40291c
commit
67b2fd698b
2 changed files with 3 additions and 3 deletions
|
@ -314,7 +314,7 @@ def editAnnotation(request, data):
|
|||
setattr(a, {
|
||||
'in': 'start',
|
||||
'out': 'end'
|
||||
}.get(key,key), value)
|
||||
}.get(key, key), value)
|
||||
add_changelog(request, data)
|
||||
a.save()
|
||||
#update sort/find tables async
|
||||
|
|
|
@ -151,7 +151,7 @@ class Place(models.Model):
|
|||
self.geoname_sort = ', '.join(reversed(self.geoname.split(', ')))
|
||||
self.name_find = '|%s|' % '|'.join([self.name]+list(self.alternativeNames)).lower()
|
||||
|
||||
self.defined = len(filter(None, [getattr(self, key)
|
||||
for key in ('south', 'west', 'north', 'east')])) > 0
|
||||
self.defined = len(list(filter(None, [getattr(self, key)
|
||||
for key in ('south', 'west', 'north', 'east')]))) > 0
|
||||
|
||||
super(Place, self).save(*args, **kwargs)
|
||||
|
|
Loading…
Reference in a new issue