Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Support project.can_assign_tasks #132

Merged
merged 2 commits into from
Apr 18, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions tests/data/test_defaults.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
"is_favorite": False,
"is_inbox_project": True,
"is_team_inbox": True,
"allow_assignment": False,
"url": "https://todoist.com/showProject?id=1234",
"view_style": "list",
}
Expand Down
1 change: 1 addition & 0 deletions tests/test_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.allow_assignment == sample_data["allow_assignment"]


def test_section_from_dict():
Expand Down
2 changes: 2 additions & 0 deletions todoist_api_python/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ class Project:
is_inbox_project: bool
is_shared: bool
is_team_inbox: bool
allow_assignment: bool
name: str
order: int
parent_id: str | None
Expand All @@ -33,6 +34,7 @@ def from_dict(cls, obj):
is_inbox_project=obj.get("is_inbox_project"),
is_shared=obj["is_shared"],
goncalossilva marked this conversation as resolved.
Show resolved Hide resolved
is_team_inbox=obj.get("is_team_inbox"),
allow_assignment=obj["allow_assignment"],
name=obj["name"],
order=obj.get("order"),
parent_id=obj.get("parent_id"),
Expand Down
Loading