From 37d1020ed4d4f0e2b88e7b45192ae6b84501ee14 Mon Sep 17 00:00:00 2001 From: Martastain Date: Sun, 24 Nov 2024 15:10:44 +0100 Subject: [PATCH] chore: typing fixes, version bump to 6.0.8 --- backend/api/browse.py | 2 +- backend/api/playout/models.py | 2 +- backend/api/rundown/get_rundown.py | 8 +------- backend/api/scheduler/models.py | 2 +- backend/nebula/version.py | 2 +- backend/pyproject.toml | 2 +- 6 files changed, 6 insertions(+), 12 deletions(-) diff --git a/backend/api/browse.py b/backend/api/browse.py index e54dffd9..c238471e 100644 --- a/backend/api/browse.py +++ b/backend/api/browse.py @@ -57,7 +57,7 @@ class BrowseRequestModel(RequestModel): examples=["star trek"], ) conditions: list[ConditionModel] | None = Field( - default_factory=list, + default_factory=lambda: [], title="Conditions", description="List of additional conditions", examples=[ diff --git a/backend/api/playout/models.py b/backend/api/playout/models.py index b183042e..d05c9617 100644 --- a/backend/api/playout/models.py +++ b/backend/api/playout/models.py @@ -59,4 +59,4 @@ class PlayoutPluginManifest(ResponseModel): class PlayoutResponseModel(ResponseModel): # TODO: use strict model from the worker - plugins: list[PlayoutPluginManifest] | None = Field(default_factory=list) + plugins: list[PlayoutPluginManifest] | None = Field(default_factory=lambda: []) diff --git a/backend/api/rundown/get_rundown.py b/backend/api/rundown/get_rundown.py index 0c33c38b..b1ea847f 100644 --- a/backend/api/rundown/get_rundown.py +++ b/backend/api/rundown/get_rundown.py @@ -154,13 +154,7 @@ async def get_rundown(request: RundownRequestModel) -> RundownResponseModel: # media is on the playout storage but corrupted istatus = ObjectStatus.CORRUPTED elif ameta[pskey]["status"] == ObjectStatus.ONLINE: - if airstatus is not None: - # media is on the playout storage and aired - istatus = airstatus - last_air = as_start - else: - # media is on the playout storage but not aired - istatus = ObjectStatus.ONLINE + istatus = airstatus if airstatus is not None else ObjectStatus.ONLINE else: istatus = ObjectStatus.UNKNOWN diff --git a/backend/api/scheduler/models.py b/backend/api/scheduler/models.py index f3b550e8..05b12146 100644 --- a/backend/api/scheduler/models.py +++ b/backend/api/scheduler/models.py @@ -28,7 +28,7 @@ class EventData(RequestModel): examples=[123], ) - items: list[dict[str, Serializable]] | None = Field(default_factory=list) + items: list[dict[str, Serializable]] | None = Field(default_factory=lambda: []) meta: dict[str, Serializable] | None = Field( default=None, diff --git a/backend/nebula/version.py b/backend/nebula/version.py index a3e63b64..65422e9e 100644 --- a/backend/nebula/version.py +++ b/backend/nebula/version.py @@ -1 +1 @@ -__version__ = "6.0.7" +__version__ = "6.0.8" diff --git a/backend/pyproject.toml b/backend/pyproject.toml index 8018ec9a..390305cd 100644 --- a/backend/pyproject.toml +++ b/backend/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "nebula" -version = "6.0.7" +version = "6.0.8" description = "Open source broadcast automation system" authors = ["Nebula Broadcast "]