Skip to content

Commit

Permalink
Update utils.py
Browse files Browse the repository at this point in the history
[backend] convert activity_type to string because stravalib is returning an instance of the class RelaxedSportType instead of a string
  • Loading branch information
joaovitoriasilva committed Nov 7, 2024
1 parent 17721da commit 298c80f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion backend/app/activities/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -562,7 +562,7 @@ def define_activity_type(activity_type):
# "Yoga"

# Get the activity type from the mapping
auxType = type_mapping.get(activity_type, 10)
auxType = type_mapping.get(str(activity_type), 10)

# Return the activity type
return auxType

0 comments on commit 298c80f

Please sign in to comment.