Fix check

This commit is contained in:
Nick Mowen 2023-01-16 14:19:55 -07:00
parent 43f17de601
commit ddb7904eb5

View File

@ -738,7 +738,7 @@ def verify_valid_live_stream_name(
frigate_config: FrigateConfig, camera_config: CameraConfig frigate_config: FrigateConfig, camera_config: CameraConfig
) -> None: ) -> None:
"""Verify that a restream exists to use for live view.""" """Verify that a restream exists to use for live view."""
if camera_config.live.stream_name not in frigate_config.go2rtc.streams.keys(): if camera_config.live.stream_name not in frigate_config.go2rtc.dict().get("streams", {}).keys():
return ValueError( return ValueError(
f"No restream with name {camera_config.live.stream_name} exists for camera {camera_config.name}." f"No restream with name {camera_config.live.stream_name} exists for camera {camera_config.name}."
) )