fix sorting of log groups
This commit is contained in:
parent
b4fcbd79d8
commit
840045c688
1 changed files with 2 additions and 1 deletions
|
|
@ -242,7 +242,8 @@ class LogsBackend(BaseBackend):
|
|||
if next_token is None:
|
||||
next_token = 0
|
||||
|
||||
groups = sorted(group.to_describe_dict() for name, group in self.groups.items() if name.startswith(log_group_name_prefix))
|
||||
groups = [group.to_describe_dict() for name, group in self.groups.items() if name.startswith(log_group_name_prefix)]
|
||||
groups = sorted(groups, key=lambda x: x['creationTime'], reverse=True)
|
||||
groups_page = groups[next_token:next_token + limit]
|
||||
|
||||
next_token += limit
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue