From 298c80fd18c1474623228487fbdb320e0f9aa105 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Vit=C3=B3ria=20Silva?= <8648976+joaovitoriasilva@users.noreply.github.com> Date: Thu, 7 Nov 2024 17:17:53 +0000 Subject: [PATCH] Update utils.py [backend] convert activity_type to string because stravalib is returning an instance of the class RelaxedSportType instead of a string --- backend/app/activities/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/app/activities/utils.py b/backend/app/activities/utils.py index 75a10d42..099264ee 100644 --- a/backend/app/activities/utils.py +++ b/backend/app/activities/utils.py @@ -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