Merge pull request #1740 from candlerb/candlerb/1739

Sort snapshots by (created_at, name)
This commit is contained in:
Jeremy Grossmann 2020-04-15 02:51:55 -07:00 committed by GitHub
commit fb153e3c71
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -64,7 +64,7 @@ class SnapshotHandler:
controller = Controller.instance()
project = controller.get_project(request.match_info["project_id"])
snapshots = [s for s in project.snapshots.values()]
response.json(sorted(snapshots, key=lambda s: s.created_at))
response.json(sorted(snapshots, key=lambda s: (s.created_at, s.name)))
@Route.delete(
r"/projects/{project_id}/snapshots/{snapshot_id}",