Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
nomad-FAIR
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
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
Service Desk
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
nomad-lab
nomad-FAIR
Commits
b20b8e05
Commit
b20b8e05
authored
4 years ago
by
Markus Scheidgen
Browse files
Options
Downloads
Patches
Plain Diff
Fixed wrong query normalization for returned api code.
#436
parent
3c02155e
No related branches found
No related tags found
2 merge requests
!233
v0.9.8 - Merge for release
,
!225
Minor bugfixes
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
nomad/app/api/common.py
+5
-2
5 additions, 2 deletions
nomad/app/api/common.py
with
5 additions
and
2 deletions
nomad/app/api/common.py
+
5
−
2
View file @
b20b8e05
...
@@ -386,8 +386,11 @@ data = response.json()'''.format(
...
@@ -386,8 +386,11 @@ data = response.json()'''.format(
def
_filter_api_query
(
query
):
def
_filter_api_query
(
query
):
def
normalize_value
(
key
,
value
):
def
normalize_value
(
key
,
value
):
quantity
=
search
.
search_quantities
.
get
(
key
)
quantity
=
search
.
search_quantities
.
get
(
key
)
if
quantity
.
many
and
not
isinstance
(
value
,
list
):
if
quantity
.
many
:
return
[
value
]
if
not
isinstance
(
value
,
list
):
return
[
value
]
else
:
return
value
elif
isinstance
(
value
,
list
)
and
len
(
value
)
==
1
:
elif
isinstance
(
value
,
list
)
and
len
(
value
)
==
1
:
return
value
[
0
]
return
value
[
0
]
...
...
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