diff options
Diffstat (limited to 'web/sync.go')
| -rw-r--r-- | web/sync.go | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/web/sync.go b/web/sync.go index 8ed306f..73e8146 100644 --- a/web/sync.go +++ b/web/sync.go @@ -215,12 +215,12 @@ func rideFromActivity(externalID, gpxPath, fitPath string, activity strava.Activ if activityType == "" { activityType = activity.Type } - return ride.StoredRide{ + stored := ride.StoredRide{ ExternalID: externalID, GPXPath: gpxPath, FitPath: fitPath, Name: activity.Name, - Type: activityType, + ExternalSportType: activityType, StartDate: activity.StartDate, DistanceM: activity.DistanceM, ExternalMovingTimeS: activity.MovingTimeS, @@ -228,6 +228,10 @@ func rideFromActivity(externalID, gpxPath, fitPath string, activity strava.Activ TotalElevationGainM: activity.TotalElevationGainM, AverageSpeedMps: activity.AverageSpeedMps, } + if bikeType, ok := ride.BikeTypeForExternalSportType(activityType); ok { + stored.BikeType = bikeType + } + return stored } func skipSyncActivity(progress *SyncProgress, report func(SyncProgress) error, activity strava.Activity, err error) error { |
