Skip to content

Commit 5606373

Browse files
mypy
1 parent 61b6c99 commit 5606373

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

app/pages/live_stream.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,10 @@ class Option(TypedDict):
126126
def live_stream_layout(user_token, api_cameras, available_stream, selected_camera_info=None, lang="fr"):
127127
# Default fallback
128128
default_stream = next(iter(available_stream.keys()))[0] if available_stream else None
129-
dropdown_options: List[Option] = [{"label": name, "value": name} for name in available_stream.keys()]
129+
130+
dropdown_options: List[dict[str, str]] = (
131+
[{"label": name, "value": name} for name in available_stream.keys()] if available_stream else []
132+
)
130133

131134
# Try to derive stream from selected camera info
132135
if selected_camera_info and available_stream:

0 commit comments

Comments
 (0)