myspace: compare date using their ordinal value (#39268)

This commit is contained in:
Frédéric Péters 2020-01-27 09:52:04 +01:00
parent 2ebf524c7e
commit 6d42dae95b
1 changed files with 1 additions and 1 deletions

View File

@ -50,7 +50,7 @@ class MyInvoicesDirectory(Directory):
invoices = []
invoices.extend(Invoice.get_with_indexed_value(
str('user_id'), str(user.id)))
invoices.sort(key=lambda x: (x.regie_id, -x.date))
invoices.sort(key=lambda x: (x.regie_id, -x.date.toordinal()))
last_regie_id = None
unpaid = False