chore(backup): make a comment into a docstring

This commit is contained in:
Houkime 2024-09-06 12:57:50 +00:00
parent 5ea000baab
commit 408284a69f

View file

@ -97,9 +97,12 @@ class Backup:
snapshots = Backups.get_all_snapshots() snapshots = Backups.get_all_snapshots()
return [snapshot_to_api(snap) for snap in snapshots] return [snapshot_to_api(snap) for snap in snapshots]
# A query for seeing which snapshots will be restored when migrating
@strawberry.field @strawberry.field
def last_slice(self) -> typing.List[SnapshotInfo]: def last_slice(self) -> typing.List[SnapshotInfo]:
"""
A query for seeing which snapshots will be restored when migrating
"""
if not Backups.is_initted(): if not Backups.is_initted():
return [] return []
return [snapshot_to_api(snap) for snap in which_snapshots_to_full_restore()] return [snapshot_to_api(snap) for snap in which_snapshots_to_full_restore()]