diff --git a/noko_client/schemas/entries_parameters.py b/noko_client/schemas/entries_parameters.py index f80e284..5c44a5b 100644 --- a/noko_client/schemas/entries_parameters.py +++ b/noko_client/schemas/entries_parameters.py @@ -60,7 +60,7 @@ class GetNokoEntriesParameters(BaseModel): user_ids: str | list | None = None description: str | None = None - project_ids: str | list | None = None + project_ids: str | int | list | None = None tag_ids: str | list | None = None tag_filter_type: str | None = None from_: str | datetime | None = Field(alias="from", default=None) diff --git a/noko_client/schemas/validators.py b/noko_client/schemas/validators.py index 85a1bb5..b6b9474 100644 --- a/noko_client/schemas/validators.py +++ b/noko_client/schemas/validators.py @@ -26,6 +26,8 @@ def format_date(value: str | datetime) -> str: def format_id_lists(value: str | int | list | None) -> str | None: """If IDs provided as lists, convert to a comma separated string.""" + if value is None: + return None return list_to_string(value) if isinstance(value, list) else str(value)