Skip to content

Commit

Permalink
Merge pull request #1 from westcoder/fix/attendance-project-fromdict
Browse files Browse the repository at this point in the history
fix: attendance project from_dict
  • Loading branch information
pietzschke authored Feb 2, 2024
2 parents ae493d1 + 96a1321 commit dfd133f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/personio_py/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -717,7 +717,10 @@ def __init__(self,
self.is_on_time_off = is_on_time_off
self.updated_at = updated_at
self.status = status
self.project = project
self.project = None
if isinstance(project, dict):
if isinstance(project["id"], int):
self.project = project["id"]

def to_dict(self, nested=False) -> Dict[str, Any]:
# yes, this is weird an unnecessary, but that's how the api works
Expand Down

0 comments on commit dfd133f

Please sign in to comment.