Skip to content

armgit / wger

Public Imported from GitHub
0

Self hosted FLOSS fitness/workout, nutrition and weight tracker

Actually pass the wger instance url

Roland Geiderf6f0fd8f7e48
diff --git a/wger/nutrition/management/commands/sync-ingredients-async.py b/wger/nutrition/management/commands/sync-ingredients-async.py
index e751a353a..bf1716c18 100644
--- a/wger/nutrition/management/commands/sync-ingredients-async.py
+++ b/wger/nutrition/management/commands/sync-ingredients-async.py
@@ -13,6 +13,7 @@
# You should have received a copy of the GNU Affero General Public License
# Django
+from django.conf import settings
from django.core.management.base import BaseCommand
# wger
@@ -26,7 +27,7 @@ class Command(BaseCommand):
def handle(self, *args, **options):
self.stdout.write('Triggering the Celery task to synchronize all ingredients...')
- check_min_server_version(remote_url)
+ check_min_server_version(settings.WGER_SETTINGS['WGER_INSTANCE'])
# Trigger the task asynchronously
sync_all_ingredients_task.delay()
diff --git a/wger/nutrition/management/commands/sync-ingredients.py b/wger/nutrition/management/commands/sync-ingredients.py
index 2f344cc4e..32373fb52 100644
--- a/wger/nutrition/management/commands/sync-ingredients.py
+++ b/wger/nutrition/management/commands/sync-ingredients.py
@@ -13,13 +13,8 @@
# You should have received a copy of the GNU Affero General Public License
# Django
-from django.conf import settings
from django.core.exceptions import ValidationError
-from django.core.management.base import (
- BaseCommand,
- CommandError,
-)
-from django.core.validators import URLValidator
+from django.core.management.base import CommandError
# wger
from wger.core.api.min_server_version import check_min_server_version