Self hosted FLOSS fitness/workout, nutrition and weight tracker
Cleanup
Roland Geider5de6b2f3d25f
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex f34135d00..4a43c4ad5 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -1,4 +1,5 @@# Changelog for the next release-<https://github.com/wger-project/wger/issues/2217> Add vegan and vegetarian flags to+<https://github.com/wger-project/wger/issues/2231> Add vegan and vegetarian flags tothe ingredient model. This allows to filter products based on dietary preferences.+The unused `/api/v2/ingredient/search/` API endpoint has been removed.diff --git a/wger/nutrition/management/commands/import-off-products.py b/wger/nutrition/management/commands/import-off-products.pyindex 47e227f50..e848730b8 100644--- a/wger/nutrition/management/commands/import-off-products.py+++ b/wger/nutrition/management/commands/import-off-products.py@@ -102,9 +102,7 @@ class Command(ImportProductCommand):try:ingredient_data = extract_info_from_off(entry, languages[entry['lang']])except (KeyError, ValueError) as e:- self.stdout.write(- f'--> Error while extracting info from OFF: {e}'- )+ self.stdout.write(f'--> Error while extracting info from OFF: {e}')self.counter['skipped'] += 1else:self.process_ingredient(ingredient_data)diff --git a/wger/nutrition/views/ingredient.py b/wger/nutrition/views/ingredient.pyindex a89a946f5..58bc1bbfc 100644--- a/wger/nutrition/views/ingredient.py+++ b/wger/nutrition/views/ingredient.py@@ -87,15 +87,6 @@ class IngredientListView(ListView):filterset = self.filterset_class(self.request.GET or None, queryset=queryset)return filterset.qs- def dispatch(self, request, *args, **kwargs):- """- Bypass the page-level cache when dietary filters are active so that- filtered results are always fresh.- """- if request.GET.get('is_vegan') or request.GET.get('is_vegetarian'):- return super(ListView, self).dispatch(request, *args, **kwargs)- return super().dispatch(request, *args, **kwargs)-def view(request, pk, slug=None):context = {}