Do not export inactive training items

This commit is contained in:
2023-03-03 11:15:06 +00:00
parent dc71c2de62
commit b1a2859f1b

View File

@@ -28,6 +28,9 @@ class ItemListExport(PrintListView):
model = models.TrainingItem
template_name = 'item_list.xml'
def get_queryset(self):
return self.model.objects.filter(active=True)
def get_context_data(self, **kwargs):
context = super().get_context_data(**kwargs)
context['filename'] = "TrainingItemList.pdf"