1
0

qt invoice list: fix #5222

This commit is contained in:
SomberNight
2019-03-26 16:38:32 +01:00
parent c4fb58cd74
commit beacf88420
2 changed files with 6 additions and 1 deletions

View File

@@ -71,6 +71,8 @@ class InvoiceList(MyTreeView):
for idx, pr in enumerate(inv_list):
key = pr.get_id()
status = self.parent.invoices.get_status(key)
if status is None:
continue
requestor = pr.get_requestor()
exp = pr.get_expiration_date()
date_str = format_time(exp) if exp else _('Never')

View File

@@ -537,4 +537,7 @@ class InvoiceStore(object):
return self.invoices.values()
def unpaid_invoices(self):
return [ self.invoices[k] for k in filter(lambda x: self.get_status(x)!=PR_PAID, self.invoices.keys())]
return [self.invoices[k] for k in
filter(lambda x: self.get_status(x) not in (PR_PAID, None),
self.invoices.keys())
]