diff --git a/tests/data/test_defaults.py b/tests/data/test_defaults.py index ade3b96..9dad345 100644 --- a/tests/data/test_defaults.py +++ b/tests/data/test_defaults.py @@ -56,6 +56,7 @@ "is_favorite": False, "is_inbox_project": True, "is_team_inbox": True, + "can_assign_tasks": False, "url": "https://todoist.com/showProject?id=1234", "view_style": "list", } diff --git a/tests/test_models.py b/tests/test_models.py index 06cf35b..d6ad6b0 100644 --- a/tests/test_models.py +++ b/tests/test_models.py @@ -52,6 +52,7 @@ def test_project_from_dict(): assert project.order == sample_data["order"] assert project.parent_id == sample_data["parent_id"] assert project.view_style == sample_data["view_style"] + assert project.can_assign_tasks == sample_data["can_assign_tasks"] def test_section_from_dict(): diff --git a/todoist_api_python/models.py b/todoist_api_python/models.py index ab9d61e..3ed5361 100644 --- a/todoist_api_python/models.py +++ b/todoist_api_python/models.py @@ -17,6 +17,7 @@ class Project: is_inbox_project: bool is_shared: bool is_team_inbox: bool + can_assign_tasks: bool name: str order: int parent_id: str | None @@ -33,6 +34,7 @@ def from_dict(cls, obj): is_inbox_project=obj.get("is_inbox_project"), is_shared=obj["is_shared"], is_team_inbox=obj.get("is_team_inbox"), + can_assign_tasks=obj["can_assign_tasks"], name=obj["name"], order=obj.get("order"), parent_id=obj.get("parent_id"),