Skip to content
Snippets Groups Projects
Commit 1bd7509a authored by HeJ's avatar HeJ
Browse files

c3nav integration: export assembly projects, too

parent da889019
No related branches found
No related tags found
No related merge requests found
......@@ -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(
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment