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
fc25b949
Commit
fc25b949
authored
Mar 18, 2021
by
David Sikter
Browse files
Bugfix: modifying query while iterating over it
parent
c3b65d9c
Pipeline
#96139
passed with stages
in 28 minutes and 2 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
nomad/app/v1/models.py
View file @
fc25b949
...
...
@@ -277,7 +277,9 @@ class WithQuery(BaseModel):
def
_validate_query
(
query
:
Query
):
if
isinstance
(
query
,
dict
):
for
key
,
value
in
query
.
items
():
for
key
,
value
in
list
(
query
.
items
()):
# Note, we loop over a list of items, not query.items(). This is because we
# may modify the query in the loop.
if
':'
in
key
:
quantity
,
qualifier
=
key
.
split
(
':'
)
else
:
...
...
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