Skip to content
Snippets Groups Projects
Commit 5b4feb25 authored by NolanB's avatar NolanB
Browse files

Modif the check of metadata value

parent e3d997e1
No related branches found
No related tags found
No related merge requests found
Pipeline #79739 failed
......@@ -152,9 +152,10 @@ class MetaDataMixin(object):
metadata.get("name"), str
), "name shouldn't be null and should be of type str"
assert metadata.get("value") and isinstance(
metadata.get("value"), (str, float, int)
), "value shouldn't be null and should be of type (str or float or int)"
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("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