Skip to content

armgit / wger

Public Imported from GitHub
0

Self hosted FLOSS fitness/workout, nutrition and weight tracker

Fix management command for submitted exercises

Roland Geiderb2e1fd5727ee
diff --git a/wger/exercises/management/commands/submitted-exercises.py b/wger/exercises/management/commands/submitted-exercises.py
index 350d0eec7..854d33c7e 100644
--- a/wger/exercises/management/commands/submitted-exercises.py
+++ b/wger/exercises/management/commands/submitted-exercises.py
@@ -32,7 +32,6 @@ class Command(BaseCommand):
exercises = Exercise.objects.filter(status=Exercise.EXERCISE_STATUS_ACCEPTED)
usernames = []
for exercise in exercises:
- username = exercise.user.username
- if username not in usernames:
- usernames.append(username)
- self.stdout.write('{0}\n'.format(username))
+ if exercise.user not in usernames:
+ usernames.append(exercise.user)
+ self.stdout.write(exercise.user)