Self hosted FLOSS fitness/workout, nutrition and weight tracker
Pass project URL to user agent
Roland Geider98c66db5104f
diff --git a/wger/exercises/management/commands/download-exercise-images.py b/wger/exercises/management/commands/download-exercise-images.pyindex d7c3cb5c1..20de3dcbc 100644--- a/wger/exercises/management/commands/download-exercise-images.py+++ b/wger/exercises/management/commands/download-exercise-images.py@@ -85,7 +85,7 @@ class Command(BaseCommand):except ValidationError:raise CommandError('Please enter a valid URL')- headers = {'User-agent': default_user_agent('wger/{} + requests'.format(get_version()))}+ headers = {'User-agent': default_user_agent(f'wger/{get_version()} + requests')}# Get all imagespage = 1@@ -109,7 +109,7 @@ class Command(BaseCommand):continuetry:- image = ExerciseImage.objects.get(uuid=image_uuid)+ ExerciseImage.objects.get(uuid=image_uuid)self.stdout.write(' Image already present locally, skipping...')continueexcept ExerciseImage.DoesNotExist:diff --git a/wger/nutrition/management/commands/download-ingredient-images.py b/wger/nutrition/management/commands/download-ingredient-images.pyindex 8f603d051..0bad30774 100644--- a/wger/nutrition/management/commands/download-ingredient-images.py+++ b/wger/nutrition/management/commands/download-ingredient-images.py@@ -80,7 +80,7 @@ class Command(BaseCommand):except ValidationError:raise CommandError('Please enter a valid URL')- headers = {'User-agent': default_user_agent(f'wger/{get_version()} + requests')}+ headers = {'User-agent': f'wger/{get_version()} https://github.com/wger-project'}# Get all imagespage = 1