Skip to content

Commit

Permalink
fix(LAB-3112): allow floats and int for certain json metadata attribu… (
Browse files Browse the repository at this point in the history
  • Loading branch information
BlueGrizzliBear committed Sep 9, 2024
1 parent 0e3e2bc commit c356b21
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/kili/services/asset_import/video.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,13 +213,16 @@ def has_complete_processing_parameters(asset) -> bool:
"numberOfFrames",
"startTime",
]
required_types = [str, float, float, int, float]
required_types = [str, (int, float), (int, float), (int, float), (int, float)]

for key, required_type in zip(required_keys, required_types):
value = processing_parameters.get(key)
if value is None or not isinstance(value, required_type):
return False

if not float(processing_parameters.get("numberOfFrames")).is_integer():
return False

return True
except JSONDecodeError:
return False
Expand Down

0 comments on commit c356b21

Please sign in to comment.