From 1ec277978ecaddd52f0c3cb047d82f5caabe8ad1 Mon Sep 17 00:00:00 2001 From: FreneticScribbler Date: Sat, 15 Feb 2020 12:54:31 +0000 Subject: [PATCH] Filter asset audit list by never-audited --- assets/views.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/assets/views.py b/assets/views.py index 06be5673..97d828f4 100644 --- a/assets/views.py +++ b/assets/views.py @@ -186,9 +186,12 @@ class AssetEmbed(AssetDetail): @method_decorator(csrf_exempt, name='dispatch') class AssetAuditList(AssetList): template_name = 'asset_audit_list.html' + hide_hidden_status = False - def form_valid(self): - print('test') + # TODO Refresh this when the modal is submitted + def get_queryset(self): + self.form = forms.AssetSearchForm(data={}) + return self.model.objects.filter(Q(last_audited_at__isnull=True)) class AssetAudit(AssetEdit): template_name = 'asset_audit.html'