Skip to content

Commit

Permalink
No team returned
Browse files Browse the repository at this point in the history
  • Loading branch information
fabricepipart committed Feb 17, 2023
1 parent f4f8879 commit 56814f2
Showing 1 changed file with 11 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,14 +62,20 @@ public static PracticeClassificationDetails from(RiderClassification c) {

public void fill(RiderClassification c) {
position = c.position;
riderName = c.rider.full_name;
riderNumber = c.rider.number;
team = c.team.name;
if (c.rider != null) {
riderName = c.rider.full_name;
riderNumber = c.rider.number;
}
if (c.team != null) {
team = c.team.name;
}
if (c.constructor != null) {
constructor = c.constructor.name;
}
gapToFirst = c.gap.first;
gapToPrevious = c.gap.prev;
if (c.gap != null) {
gapToFirst = c.gap.first;
gapToPrevious = c.gap.prev;
}
totalLaps = c.total_laps;
}
}

0 comments on commit 56814f2

Please sign in to comment.