mirror of
https://github.com/GNS3/gns3-server
synced 2024-11-20 07:18:07 +00:00
Merge pull request #1740 from candlerb/candlerb/1739
Sort snapshots by (created_at, name)
This commit is contained in:
commit
fb153e3c71
@ -64,7 +64,7 @@ class SnapshotHandler:
|
|||||||
controller = Controller.instance()
|
controller = Controller.instance()
|
||||||
project = controller.get_project(request.match_info["project_id"])
|
project = controller.get_project(request.match_info["project_id"])
|
||||||
snapshots = [s for s in project.snapshots.values()]
|
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(
|
@Route.delete(
|
||||||
r"/projects/{project_id}/snapshots/{snapshot_id}",
|
r"/projects/{project_id}/snapshots/{snapshot_id}",
|
||||||
|
Loading…
Reference in New Issue
Block a user