diff --git a/src/c3nav/mapdata/models/locations.py b/src/c3nav/mapdata/models/locations.py index b548cc01..6a2821c5 100644 --- a/src/c3nav/mapdata/models/locations.py +++ b/src/c3nav/mapdata/models/locations.py @@ -85,10 +85,7 @@ 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: - if describe_only and not self.can_describe: - fields = ('id', 'on_top_of') - else: - fields = ('id', 'type', 'slug', 'title', 'subtitle', 'point', 'bounds', 'locations', 'on_top_of') + fields = ('id', 'type', 'slug', 'title', 'subtitle', 'point', 'bounds', 'locations', 'on_top_of') result = OrderedDict(((name, result[name]) for name in fields if name in result)) return result diff --git a/src/c3nav/routing/route.py b/src/c3nav/routing/route.py index 0eebaeab..d669241b 100644 --- a/src/c3nav/routing/route.py +++ b/src/c3nav/routing/route.py @@ -12,9 +12,7 @@ def describe_location(location, locations): final_location = locations.get(location.pk) if final_location is not None: location = final_location - else: - location.can_describe = False - return location.serialize(include_type=True, detailed=False, describe_only=True, simple_geometry=True) + return location.serialize(include_type=True, detailed=False, simple_geometry=True) class Route: