Commit 65a142a2 authored by MOREAU Ulysse's avatar MOREAU Ulysse
Browse files

Fix mypy

parent 0c742d98
......@@ -30,6 +30,7 @@ from django.views.generic import DetailView
from django.views.generic import ListView
from django.views.generic import RedirectView
from django.views.generic import UpdateView
from django.views.generic import View
from django.views.generic.detail import SingleObjectMixin
from django.views.generic.edit import FormMixin
from django.views.generic.edit import ModelFormMixin
......@@ -160,13 +161,13 @@ class ItemEditView(PermissionRequiredMixin, UpdateView):
return response
class CsvExportView(PermissionRequiredMixin, ListView, SingleObjectMixin):
class CsvExportView(PermissionRequiredMixin, SingleObjectMixin, View):
model = Item
permission_required = ""
object: Item
def get(self, request: HttpRequest, *args, **kwargs) -> HttpResponse:
self.object = self.get_object()
self.object = self.get_object() # type: ignore[assignment]
item_qs = self.get_queryset().filter(
item = item_qs.prefetch_related(
"order_items__order__payment", "order_items__order__user__profile"
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment