Skip to content

armgit / wger

Public Imported from GitHub
0

Self hosted FLOSS fitness/workout, nutrition and weight tracker

Don't cache the ingredient overview

Roland Geiderf0a8a5d5ed47
diff --git a/wger/nutrition/api/views.py b/wger/nutrition/api/views.py
index e14abaf29..e9431cc13 100644
--- a/wger/nutrition/api/views.py
+++ b/wger/nutrition/api/views.py
@@ -92,10 +92,6 @@ class IngredientViewSet(viewsets.ReadOnlyModelViewSet):
'license_author',
)
- @method_decorator(cache_page(settings.WGER_SETTINGS['EXERCISE_CACHE_TTL']))
- def dispatch(self, request, *args, **kwargs):
- super().dispatch(request, *args, **kwargs)
-
@action(detail=True)
def get_values(self, request, pk):
"""
diff --git a/wger/nutrition/tests/test_ingredient.py b/wger/nutrition/tests/test_ingredient.py
index 3f8700db2..0122dc94f 100644
--- a/wger/nutrition/tests/test_ingredient.py
+++ b/wger/nutrition/tests/test_ingredient.py
@@ -208,7 +208,7 @@ class IngredientDetailTestCase(WgerTestCase):
def test_ingredient_detail_editor(self):
"""
- Tests the ingredient details page as a logged in user with editor rights
+ Tests the ingredient details page as a logged-in user with editor rights
"""
self.user_login('admin')
@@ -216,7 +216,7 @@ class IngredientDetailTestCase(WgerTestCase):
def test_ingredient_detail_non_editor(self):
"""
- Tests the ingredient details page as a logged in user without editor rights
+ Tests the ingredient details page as a logged-in user without editor rights
"""
self.user_login('test')
@@ -272,7 +272,7 @@ class IngredientSearchTestCase(WgerTestCase):
def test_search_ingredient_logged_in(self):
"""
- Test searching for an ingredient by a logged in user
+ Test searching for an ingredient by a logged-in user
"""
self.user_login('test')
@@ -350,7 +350,7 @@ class IngredientValuesTestCase(WgerTestCase):
def test_calculate_value_logged_in(self):
"""
- Calculate the nutritional values as a logged in user
+ Calculate the nutritional values as a logged-in user
"""
self.user_login('test')