Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
B
Base Worker
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
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
Workers
Base Worker
Merge requests
!243
Loosen checks on numeric values
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Loosen checks on numeric values
loosen-checks-on-numeric-values
into
master
Overview
0
Commits
2
Pipelines
1
Changes
1
Merged
Thibault Lavigne
requested to merge
loosen-checks-on-numeric-values
into
master
2 years ago
Overview
0
Commits
2
Pipelines
1
Changes
1
Expand
Closes
#163 (closed)
0
0
Merge request reports
Viewing commit
22db146d
Prev
Next
Show latest version
1 file
+
3
−
4
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
22db146d
Fix the assertion
· 22db146d
NolanB
authored
2 years ago
arkindex_worker/worker/metadata.py
+
3
−
4
Options
@@ -152,10 +152,9 @@ class MetaDataMixin(object):
metadata
.
get
(
"
name
"
),
str
),
"
name shouldn
'
t be null and should be of type str
"
value
=
metadata
.
get
(
"
value
"
)
assert
value
is
not
None
and
isinstance
(
value
,
(
str
,
float
,
int
)
and
0
<=
value
<=
1
),
"
value shouldn
'
t be null and should be of type (str or float or int) in [0..1] range
"
assert
metadata
.
get
(
"
value
"
)
is
not
None
and
isinstance
(
metadata
.
get
(
"
value
"
),
(
str
,
float
,
int
)
),
"
value shouldn
'
t be null and should be of type (str or float or int)
"
assert
metadata
.
get
(
"
entity_id
"
)
is
None
or
isinstance
(
metadata
.
get
(
"
entity_id
"
),
str
Loading