Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
H
hub
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Package registry
Operate
Terraform modules
Analyze
Contributor analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
thomasDOTwtf
hub
Commits
1bd7509a
Commit
1bd7509a
authored
4 months ago
by
HeJ
Browse files
Options
Downloads
Patches
Plain Diff
c3nav integration: export assembly projects, too
parent
da889019
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/api/views/maps.py
+17
-1
17 additions, 1 deletion
src/api/views/maps.py
with
17 additions
and
1 deletion
src/api/views/maps.py
+
17
−
1
View file @
1bd7509a
...
...
@@ -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
(
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment