-
-
Notifications
You must be signed in to change notification settings - Fork 24
Time parse error for club events #89
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Time parse error for club events #89
Conversation
* [#89]https://github.com/dblock/strava-ruby-client/pull/89: Fix for time parsing in club events - [@tobiaszwaszak](https://github.com/tobiaszwaszak).Generated by 🚫 Danger |
58456d1 to
9b6e411
Compare
dblock
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is Strava actually returning? If it's nil, then handle this with an if.
property 'created_at', transform_with: ->(v) { Time.parse(v) if v }| @@ -1,5 +1,6 @@ | |||
| ### 2.3.0 (Next) | |||
|
|
|||
| * [#89]https://github.com/dblock/strava-ruby-client/pull/89: Fix for time parsing in club events - [@tobiaszwaszak](https://github.com/tobiaszwaszak). | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| * [#89]https://github.com/dblock/strava-ruby-client/pull/89: Fix for time parsing in club events - [@tobiaszwaszak](https://github.com/tobiaszwaszak). | |
| * [#89](https://github.com/dblock/strava-ruby-client/pull/89): Fix `nil` time parsing in club events - [@tobiaszwaszak](https://github.com/tobiaszwaszak). |
yes its nil |
dblock
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix doesn't seem quite right. Iterate till CI passes too please, CHANGELOG needs an update.
| property 'organizing_athlete', transform_with: ->(oa) { Strava::Models::Athlete.new(oa) } | ||
| property 'activity_type' | ||
| property 'created_at', transform_with: ->(v) { Time.parse(v) } | ||
| property 'created_at', transform_with: ->(v) { Time.parse(v) if v['created_at'] } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can't be right because v is the time, not v['created_at']. Add a test when the club activity has a created_at time and that test should pass.
|
Fixed in #95. |
This is probably an issue on strava site, but it's easier to handle it on gem side.
When I try to get club events, I have an error:
Looks like there is no information about
created_atThis PR handles that issue