provide coordinates when serializing a custom location
This commit is contained in:
parent
5e96d98693
commit
99e33eeb9e
2 changed files with 1 additions and 2 deletions
|
@ -526,7 +526,6 @@ class DynamicLocation(CustomLocationProxyMixin, SpecificLocation, models.Model):
|
||||||
'available': True,
|
'available': True,
|
||||||
'id': self.pk,
|
'id': self.pk,
|
||||||
'slug': self.slug,
|
'slug': self.slug,
|
||||||
'coordinates': custom_location.pk,
|
|
||||||
'icon': self.get_icon(),
|
'icon': self.get_icon(),
|
||||||
'title': self.title,
|
'title': self.title,
|
||||||
'subtitle': '%s %s%s, %s' % (
|
'subtitle': '%s %s%s, %s' % (
|
||||||
|
@ -619,7 +618,6 @@ class Position(CustomLocationProxyMixin, models.Model):
|
||||||
'available': True,
|
'available': True,
|
||||||
'id': 'p:%s' % self.secret,
|
'id': 'p:%s' % self.secret,
|
||||||
'slug': 'p:%s' % self.secret,
|
'slug': 'p:%s' % self.secret,
|
||||||
'coordinates': custom_location.pk,
|
|
||||||
'icon': 'my_location',
|
'icon': 'my_location',
|
||||||
'title': self.name,
|
'title': self.name,
|
||||||
'subtitle': '%s, %s, %s' % (
|
'subtitle': '%s, %s, %s' % (
|
||||||
|
|
|
@ -292,6 +292,7 @@ class CustomLocation:
|
||||||
result = OrderedDict((
|
result = OrderedDict((
|
||||||
('id', self.pk),
|
('id', self.pk),
|
||||||
('slug', self.pk),
|
('slug', self.pk),
|
||||||
|
('coordinates', self.pk),
|
||||||
('icon', self.icon),
|
('icon', self.icon),
|
||||||
('title', self.title),
|
('title', self.title),
|
||||||
('subtitle', self.subtitle),
|
('subtitle', self.subtitle),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue