Skip to content

Commit

Permalink
Merge pull request #132 from Doist/amix/ft.allow-assignment
Browse files Browse the repository at this point in the history
  • Loading branch information
amix authored Apr 18, 2024
2 parents 3e30b13 + 9409ade commit a86432d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
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,
"can_assign_tasks": 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.can_assign_tasks == sample_data["can_assign_tasks"]


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
can_assign_tasks: 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"],
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"),
Expand Down

0 comments on commit a86432d

Please sign in to comment.