refactor: Fix issue with handling None values in ResultData class

Fix the issue where None values were not being handled correctly in the ResultData class. This ensures that the code properly handles cases where the message is None, preventing any potential errors or unexpected behavior.
This commit is contained in:
ogabrielluiz 2024-06-13 16:30:29 -03:00
commit b3266bab9c

View file

@ -35,8 +35,8 @@ class ResultData(BaseModel):
message = values["artifacts"][key]
# ! Temporary fix
if not isinstance(message, dict):
message = {"message": message}
if message is None:
continue
if "stream_url" in message and "type" in message:
stream_url = StreamURL(location=message["stream_url"])