From 408284a69f736f61297fde46255f36a5a507a4cf Mon Sep 17 00:00:00 2001 From: Houkime <> Date: Fri, 6 Sep 2024 12:57:50 +0000 Subject: [PATCH] chore(backup): make a comment into a docstring --- selfprivacy_api/graphql/queries/backup.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/selfprivacy_api/graphql/queries/backup.py b/selfprivacy_api/graphql/queries/backup.py index ad5b0da..7eba72d 100644 --- a/selfprivacy_api/graphql/queries/backup.py +++ b/selfprivacy_api/graphql/queries/backup.py @@ -97,9 +97,12 @@ class Backup: snapshots = Backups.get_all_snapshots() return [snapshot_to_api(snap) for snap in snapshots] - # A query for seeing which snapshots will be restored when migrating @strawberry.field def last_slice(self) -> typing.List[SnapshotInfo]: + """ + A query for seeing which snapshots will be restored when migrating + """ + if not Backups.is_initted(): return [] return [snapshot_to_api(snap) for snap in which_snapshots_to_full_restore()]