Skip to content

armgit / wger

Public Imported from GitHub
0

Self hosted FLOSS fitness/workout, nutrition and weight tracker

Add type hinting to parameter

Roland Geiderd844c1bcb432
diff --git a/wger/exercises/api/views.py b/wger/exercises/api/views.py
index 6cc898431..1fde6113c 100644
--- a/wger/exercises/api/views.py
+++ b/wger/exercises/api/views.py
@@ -21,6 +21,7 @@ import logging
# Django
from django.conf import settings
from django.db.models import Q
+from django.http import HttpRequest
from django.utils.decorators import method_decorator
from django.utils.translation import gettext as _
from django.views.decorators.cache import cache_page
@@ -346,7 +347,7 @@ class ExerciseBaseInfoViewset(viewsets.ReadOnlyModelViewSet):
)
@method_decorator(cache_page(settings.WGER_SETTINGS['EXERCISE_CACHE_TTL']))
- def dispatch(self, request, *args, **kwargs):
+ def dispatch(self, request: HttpRequest, *args, **kwargs):
return super().dispatch(request, *args, **kwargs)