From 525d708d3a17190114767c8e1557e1c1030f86b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Laura=20Kl=C3=BCnder?= Date: Mon, 10 Dec 2018 19:40:25 +0100 Subject: [PATCH] =?UTF-8?q?cell=20=E2=86=92=20grid=5Fsquare?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/c3nav/mapdata/models/locations.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/c3nav/mapdata/models/locations.py b/src/c3nav/mapdata/models/locations.py index 854a6c29..e02af8ce 100644 --- a/src/c3nav/mapdata/models/locations.py +++ b/src/c3nav/mapdata/models/locations.py @@ -86,7 +86,8 @@ class Location(LocationSlug, AccessRestrictionMixin, TitledMixin, models.Model): def serialize(self, detailed=True, describe_only=False, **kwargs): result = super().serialize(detailed=detailed, **kwargs) if not detailed: - fields = ('id', 'type', 'slug', 'title', 'subtitle', 'point', 'bounds', 'locations', 'cell', 'on_top_of') + fields = ('id', 'type', 'slug', 'title', 'subtitle', 'point', 'bounds', 'grid_square', + 'locations', 'on_top_of') result = OrderedDict(((name, result[name]) for name in fields if name in result)) return result @@ -141,7 +142,7 @@ class SpecificLocation(Location, models.Model): if grid.enabled: grid_square = self.grid_square if grid_square is not None: - result['cell'] = grid_square or None + result['grid_square'] = grid_square or None if detailed: groups = {} for group in self.groups.all():