Skip to content
2 changes: 1 addition & 1 deletion src/iracingdataapi/models/members.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ class MemberRecentEvent(BaseModel):
event_name: str
event_type: str
finish_position: int
logo_url: str
logo_url: str | None = None
percent_rank: int
simsession_type: int
start_time: str
Expand Down
2 changes: 1 addition & 1 deletion src/iracingdataapi/models/responses.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ class MemberGetResponse(BaseModel):


class MemberProfileResponse(BaseModel):
activity: MemberActivity
activity: MemberActivity | None = None
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have you spotted a member profile in the wild activity of None?

If so, add a new file member_profile_no_activity.json to mock_return_data with that profile and add a test for it.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added the test and mock_return_data

cust_id: int
disabled: bool
follow_counts: MemberFollowCounts
Expand Down
4 changes: 2 additions & 2 deletions src/iracingdataapi/models/results.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,15 +133,15 @@ class SessionResultDetailBase(BaseModel):

class SessionResultDetailDriver(SessionResultDetailBase):
cust_id: int
flair_shortname: str
flair_shortname: str | None = None
helmet: Helmet
team_id: int


class SessionResultDetail(SessionResultDetailBase):
cust_id: int | None = None
division_name: str | None = None
driver_results: SessionResultDetailDriver | None = None
driver_results: list[SessionResultDetailDriver] | None = None
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This could do with a matching file in the mock data and associated test too – I assume these are in team results but I'm not anywhere I can check at the moment.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes its a team result, i will add a test too

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added the test and mock_return_data

flair_shortname: str | None = None
helmet: Helmet | None = None
team_id: int | None = None
Expand Down
Loading