Skip to content
Snippets Groups Projects
Commit 563a011a authored by NolanB's avatar NolanB
Browse files

Fix the assertion

parent 5b4feb25
No related branches found
No related tags found
No related merge requests found
Pipeline #79740 passed
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment