Commit 0cea299b authored by Nicolas Joyard's avatar Nicolas Joyard
Browse files

CSV export: fix filename + export what is currently filtered

parent 9a94618d
......@@ -18,7 +18,7 @@ class RepresentativeList(CSVDownloadMixin, GridListMixin, PaginationMixin,
RepresentativeViewMixin, ActiveLegislatureMixin,
generic.ListView):
csv_name = 'meps.csv'
csv_name = 'representatives'
queryset = Representative.objects.select_related('score')
def get_context_data(self, **kwargs):
......@@ -75,7 +75,7 @@ class RepresentativeList(CSVDownloadMixin, GridListMixin, PaginationMixin,
return qs
def get_csv_results(self, context, **kwargs):
qs = super(RepresentativeList, self).get_queryset()
qs = self.get_queryset()
qs = qs.prefetch_related('email_set')
return [self.add_representative_country_and_main_mandate(r)
for r in qs]
......
Markdown is supported
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