diff --git a/mpwo_api/mpwo_api/activities/models.py b/mpwo_api/mpwo_api/activities/models.py index 247d359c..9b9c0234 100644 --- a/mpwo_api/mpwo_api/activities/models.py +++ b/mpwo_api/mpwo_api/activities/models.py @@ -67,11 +67,9 @@ class Activity(db.Model): "creation_date": self.creation_date, "modification_date": self.modification_date, "activity_date": self.activity_date, - "duration": (self.duration.total_seconds() - if self.duration - else None), - "pauses": self.pauses.total_seconds() if self.pauses else None, - "moving": self.moving.total_seconds() if self.moving else None, + "duration": str(self.duration) if self.duration else None, + "pauses": str(self.pauses) if self.pauses else None, + "moving": str(self.moving) if self.moving else None, "distance": float(self.distance) if self.distance else None, "min_alt": float(self.min_alt) if self.min_alt else None, "max_alt": float(self.max_alt) if self.max_alt else None, diff --git a/mpwo_client/src/components/Activities/ActivityDisplay.jsx b/mpwo_client/src/components/Activities/ActivityDisplay.jsx index e8dc565c..0e64aeda 100644 --- a/mpwo_client/src/components/Activities/ActivityDisplay.jsx +++ b/mpwo_client/src/components/Activities/ActivityDisplay.jsx @@ -27,7 +27,7 @@ class ActivityDisplay extends React.Component {
{activity && sports.length > 0 && (
-
+
{sports.filter(sport => sport.id === activity.sport_id) @@ -35,41 +35,44 @@ class ActivityDisplay extends React.Component { {activity.activity_date}
-
-
-

-