Sort results by date (last call in first position)
This commit is contained in:
parent
a8e01e7aee
commit
c4d1cde58c
1 changed files with 5 additions and 1 deletions
|
|
@ -73,6 +73,10 @@ class DetailsPage(BasePage):
|
|||
return self.details
|
||||
|
||||
|
||||
def _get_date(detail):
|
||||
return detail.datetime
|
||||
|
||||
|
||||
class HistoryPage(BasePage):
|
||||
calls = []
|
||||
|
||||
|
|
@ -95,4 +99,4 @@ class HistoryPage(BasePage):
|
|||
self.calls.append(detail)
|
||||
|
||||
def get_calls(self):
|
||||
return self.calls
|
||||
return sorted(self.calls, key=_get_date, reverse=True)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue