Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
compendium-v2
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
geant-swd
compendium-v2
Commits
cdd7aa27
Commit
cdd7aa27
authored
1 year ago
by
Bjarke Madsen
Browse files
Options
Downloads
Patches
Plain Diff
Fix flake8 errors that only show up in release process..
parent
29cdf74b
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
compendium_v2/conversion/conversion.py
+1
-1
1 addition, 1 deletion
compendium_v2/conversion/conversion.py
compendium_v2/routes/survey.py
+2
-2
2 additions, 2 deletions
compendium_v2/routes/survey.py
with
3 additions
and
3 deletions
compendium_v2/conversion/conversion.py
+
1
−
1
View file @
cdd7aa27
...
@@ -76,7 +76,7 @@ def convert_answers(answers):
...
@@ -76,7 +76,7 @@ def convert_answers(answers):
else
:
else
:
subdict
=
subdict
.
setdefault
(
name
,
{})
subdict
=
subdict
.
setdefault
(
name
,
{})
if
typ
e
(
subdict
)
==
list
:
# special case where json list is mapped to a list of dicts (part 2)
if
isinstanc
e
(
subdict
,
list
)
:
# special case where json list is mapped to a list of dicts (part 2)
for
answer_entry
in
answer
:
for
answer_entry
in
answer
:
subdict
.
append
({
question_names
[
-
1
]:
answer_entry
})
subdict
.
append
({
question_names
[
-
1
]:
answer_entry
})
elif
question_names
[
-
1
]
==
"
available
"
:
# special case because we changed the policies questions a bit
elif
question_names
[
-
1
]
==
"
available
"
:
# special case because we changed the policies questions a bit
...
...
This diff is collapsed.
Click to expand it.
compendium_v2/routes/survey.py
+
2
−
2
View file @
cdd7aa27
...
@@ -287,9 +287,9 @@ def inspect_survey(year) -> Any:
...
@@ -287,9 +287,9 @@ def inspect_survey(year) -> Any:
def
visible_visitor
(
object
,
items
):
def
visible_visitor
(
object
,
items
):
for
key
,
value
in
items
:
for
key
,
value
in
items
:
if
typ
e
(
value
)
==
dict
:
if
isinstanc
e
(
value
,
dict
)
:
visible_visitor
(
value
,
value
.
items
())
visible_visitor
(
value
,
value
.
items
())
elif
typ
e
(
value
)
==
list
:
elif
isinstanc
e
(
value
,
list
)
:
visible_visitor
(
value
,
enumerate
(
value
))
visible_visitor
(
value
,
enumerate
(
value
))
elif
key
==
'
visibleIf
'
:
elif
key
==
'
visibleIf
'
:
object
[
'
title
'
]
=
object
[
'
title
'
]
+
'
(visibleif: [
'
+
value
.
replace
(
'
{
'
,
'
#
'
).
replace
(
'
}
'
,
'
#
'
)
+
'
])
'
object
[
'
title
'
]
=
object
[
'
title
'
]
+
'
(visibleif: [
'
+
value
.
replace
(
'
{
'
,
'
#
'
).
replace
(
'
}
'
,
'
#
'
)
+
'
])
'
...
...
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