Self hosted FLOSS fitness/workout, nutrition and weight tracker
Solved bug in download-exercise-images.py task
Leninuxf68333b03af1
diff --git a/AUTHORS.rst b/AUTHORS.rstindex e0a6c34c9..5f345d15b 100644--- a/AUTHORS.rst+++ b/AUTHORS.rst@@ -57,6 +57,7 @@ Developers* Calvin Walden - https://github.com/calvinrw* Jack Mulligan - https://github.com/jackmulligan-ire* Kristopher Newsome - https://github.com/sysadmin75+* Leninux - https://github.com/RedRudeBoyTranslators-----------diff --git a/wger/exercises/management/commands/download-exercise-images.py b/wger/exercises/management/commands/download-exercise-images.pyindex 82c31fb47..bed9f3e86 100644--- a/wger/exercises/management/commands/download-exercise-images.py+++ b/wger/exercises/management/commands/download-exercise-images.py@@ -96,12 +96,6 @@ class Command(BaseCommand):self.stdout.write('')self.stdout.write(f'*** Page {page}')self.stdout.write('')- page += 1-- if result['next']:- result = requests.get(result['next'], headers=headers).json()- else:- all_images_processed = Truefor image_data in result['results']:image_uuid = image_data['uuid']@@ -144,3 +138,9 @@ class Command(BaseCommand):)image.save()self.stdout.write(self.style.SUCCESS(' successfully saved'))++ if result['next']:+ page += 1+ result = requests.get(result['next'], headers=headers).json()+ else:+ all_images_processed = True