-
Notifications
You must be signed in to change notification settings - Fork 1.3k
fix: only has 'run' sport type when syncing with GPX files #835
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
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
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.
Pull Request Overview
This PR fixes the issue where GPX files were not properly syncing the track type, ensuring that if a GPX track includes a type, it is used correctly.
- Added a check to determine if the GPX track has a "type" attribute and, if so, assigns it to the track instance
- Ensures that only the run sport type is considered when syncing with GPX files
Comments suppressed due to low confidence (1)
run_page/gpxtrackposter/track.py:209
- [nitpick] Using the attribute name 'type' may shadow the Python built-in and lead to confusion. Consider renaming it to a more descriptive name such as 'track_type'.
self.type = t.type
|
thanks |
|
This change seems to have some issues. For Garmin GPX files, the type is "running", whereas many functionalities rely on the type being "Run". if hasattr(t, "type") and t.type:
self.type = t.type |
can you help to fix this? |
I will do it late. |
1 similar comment
I will do it late. |
|
the pr is #852. |
While I was figuring out how to generate my workouts page only with GPX files, I found the problem described in the title, so I fixed it :)