Skip to content

Commit

Permalink
Revert "Revert "feat: Support project.allow_assignment""
Browse files Browse the repository at this point in the history
This reverts commit fde6355.
  • Loading branch information
amix committed Apr 11, 2024
1 parent fde6355 commit e7a42ce
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,
"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"],
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

0 comments on commit e7a42ce

Please sign in to comment.