diff --git a/src/api/views/maps.py b/src/api/views/maps.py index c238affb721217a00f35d065df5907fd645b40a8..245e265d5bef40efad8a46341f33e99e81b244d3 100644 --- a/src/api/views/maps.py +++ b/src/api/views/maps.py @@ -141,7 +141,7 @@ class C3NavExportView(ConferenceSlugMixin, APIView): qs = self.conference.assemblies.filter(state__in=exportable_states) if request.GET.get('all') != '1': qs = qs.exclude(location_data__point=None, location_data__boundaries=None) - for assembly in qs: # type: Assembly + for assembly in qs.all(): # type: Assembly loc_data = assembly.location_data or {} data.append( { @@ -160,6 +160,22 @@ class C3NavExportView(ConferenceSlugMixin, APIView): } ) + for project in assembly.projects.conference_accessible(self.conference): + data.append( + { + 'type': 'project', + 'id': str(project.pk), + 'slug': project.slug, + 'name': project.name, + 'description': {'de': project.description_de, 'en': project.description_en}, + 'public_url': hub_absolute('plainui:project', slug=project.slug), + 'assembly_id': str(assembly.pk), + 'floor': assembly.get_location_floor_index(), # TODO: allow project-specific location floor + 'location': loc_data.get('point'), # TODO: allow project-specific location point + 'location_text': project.location, + } + ) + for poi in self.conference.pois.filter(visible=True): # type: MapPOI data.append( {