From 30f3ca1b02c0a941391689b5e8c77bb5eee9ce63 Mon Sep 17 00:00:00 2001
From: Simen <simen_opedal@hotmail.com>
Date: Sun, 3 Apr 2022 15:11:36 +0200
Subject: [PATCH] refactor - function return types should be consisten with
 theiir type hint

---
 .gitignore                        | 1 +
 backend/secfit/workouts/models.py | 9 +++++----
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/.gitignore b/.gitignore
index 420718a..1e66904 100644
--- a/.gitignore
+++ b/.gitignore
@@ -5,4 +5,5 @@ backend/secfit/db.sqlite3
 backend/secfit/htmlcov/
 backend/secfit/.coverage
 backend/secfit/.coveragerc
+.vscode
 .idea
diff --git a/backend/secfit/workouts/models.py b/backend/secfit/workouts/models.py
index 0f6214f..484a8b7 100644
--- a/backend/secfit/workouts/models.py
+++ b/backend/secfit/workouts/models.py
@@ -65,7 +65,7 @@ class Workout(models.Model):
         ordering = ["-date"]
 
     def __str__(self):
-        return self.name
+        return str(self.name)
 
 
 class Exercise(models.Model):
@@ -90,7 +90,7 @@ class Exercise(models.Model):
     unit = models.CharField(max_length=50)
 
     def __str__(self):
-        return self.name
+        return str(self.name)
 
 
 class ExerciseInstance(models.Model):
@@ -139,7 +139,8 @@ class WorkoutFile(models.Model):
         file:    The actual file that's being uploaded
     """
 
-    workout = models.ForeignKey(Workout, on_delete=models.CASCADE, related_name="files")
+    workout = models.ForeignKey(
+        Workout, on_delete=models.CASCADE, related_name="files")
     owner = models.ForeignKey(
         get_user_model(), on_delete=models.CASCADE, related_name="workout_files"
     )
@@ -156,4 +157,4 @@ class RememberMe(models.Model):
     remember_me = models.CharField(max_length=500)
 
     def __str__(self):
-        return self.remember_me
+        return str(self.remember_me)
-- 
GitLab