Exclude blank report types as well
This commit is contained in:
parent
c233ebbb74
commit
63fd53f42a
|
@ -226,7 +226,9 @@ class TransactionViewSet(Base, List, Create, Retrieve, Update):
|
||||||
def get_queryset(self):
|
def get_queryset(self):
|
||||||
queryset = models.Transaction.objects
|
queryset = models.Transaction.objects
|
||||||
if self.action == 'list':
|
if self.action == 'list':
|
||||||
return queryset.exclude(report_type__isnull=True).order_by('-id', '-date')
|
queryset = queryset.exclude(report_type__isnull=True)
|
||||||
|
queryset = queryset.exclude(report_type='')
|
||||||
|
return queryset.order_by('-id', '-date')
|
||||||
else:
|
else:
|
||||||
return queryset.all()
|
return queryset.all()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user