Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
nomad-lab
nomad-FAIR
Commits
c55df4e5
Commit
c55df4e5
authored
Dec 03, 2020
by
Markus Scheidgen
Browse files
Fixed achive required normalization.
parent
f7688734
Changes
1
Hide whitespace changes
Inline
Side-by-side
nomad/archive.py
View file @
c55df4e5
...
...
@@ -893,6 +893,7 @@ def compute_required_with_referenced(required):
if
isinstance
(
current
,
str
):
return
current_updates
=
{}
for
key
,
value
in
current
.
items
():
prop
=
key
.
split
(
'['
)[
0
]
prop_definition
=
parent
.
all_properties
[
prop
]
...
...
@@ -902,13 +903,14 @@ def compute_required_with_referenced(required):
traverse
(
value
,
prop_definition
.
sub_section
)
if
isinstance
(
prop_definition
,
Quantity
)
and
isinstance
(
prop_definition
.
type
,
Reference
):
current
[
prop
]
=
'*'
current
_updates
[
prop
]
=
'*'
if
FastAccess
.
m_def
not
in
prop_definition
.
categories
:
continue
target_section_def
=
prop_definition
.
type
.
target_section_def
.
m_resolved
()
add_parent_section
(
target_section_def
,
value
)
traverse
(
value
,
target_section_def
)
current
.
update
(
**
current_updates
)
try
:
traverse
(
dict
(
**
required
))
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment