Skip to content

Commit

Permalink
Merge pull request #3 from RedRem95/member_api_fix
Browse files Browse the repository at this point in the history
Fixed member object not beeing created due to additional information …
  • Loading branch information
RedRem95 authored Dec 2, 2024
2 parents 33dc5e4 + 9bac583 commit fc21062
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
2 changes: 1 addition & 1 deletion clickup_to_ical/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.0.9"
__version__ = "0.0.10"
14 changes: 13 additions & 1 deletion clickup_to_ical/clickup/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,19 @@ def __str__(self):

@classmethod
def from_json(cls, json_data: dict) -> "Member":
return cls(**json_data)
return cls(
id=_to_int(json_data.get("id")),
username=json_data.get("username"),
email=json_data.get("email"),
color=json_data.get("color"),
profilePicture=json_data.get("profilePicture"),
initials=json_data.get("initials"),
role=_to_int(json_data.get("role")),
custom_role=json_data.get("custom_role"),
last_active=json_data.get("last_active"),
date_joined=json_data.get("date_joined"),
date_invited=json_data.get("date_invited"),
)


@dataclass(frozen=True)
Expand Down

0 comments on commit fc21062

Please sign in to comment.