forked from 0x2620/pandora
fix save place
This commit is contained in:
parent
50bb40291c
commit
67b2fd698b
2 changed files with 3 additions and 3 deletions
|
@ -151,7 +151,7 @@ class Place(models.Model):
|
||||||
self.geoname_sort = ', '.join(reversed(self.geoname.split(', ')))
|
self.geoname_sort = ', '.join(reversed(self.geoname.split(', ')))
|
||||||
self.name_find = '|%s|' % '|'.join([self.name]+list(self.alternativeNames)).lower()
|
self.name_find = '|%s|' % '|'.join([self.name]+list(self.alternativeNames)).lower()
|
||||||
|
|
||||||
self.defined = len(filter(None, [getattr(self, key)
|
self.defined = len(list(filter(None, [getattr(self, key)
|
||||||
for key in ('south', 'west', 'north', 'east')])) > 0
|
for key in ('south', 'west', 'north', 'east')]))) > 0
|
||||||
|
|
||||||
super(Place, self).save(*args, **kwargs)
|
super(Place, self).save(*args, **kwargs)
|
||||||
|
|
Loading…
Reference in a new issue