Skip to content

Commit

Permalink
Fix project id bug
Browse files Browse the repository at this point in the history
  • Loading branch information
ABizzinotto committed Sep 19, 2023
1 parent d6ab120 commit ec4d3c5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion noko_client/schemas/entries_parameters.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 2 additions & 0 deletions noko_client/schemas/validators.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)


Expand Down

0 comments on commit ec4d3c5

Please sign in to comment.