diff --git a/backend/apps/archive/google_drive_api.py b/backend/apps/archive/google_drive_api.py index 278f3ed2c..facb8f91d 100644 --- a/backend/apps/archive/google_drive_api.py +++ b/backend/apps/archive/google_drive_api.py @@ -18,7 +18,7 @@ def get_url(self, file_id: str) -> Optional[str]: ) .execute() ) - return file["webViewLink"] + return file.get("webViewLink") def get_thumbnail(self, file_id: str) -> Optional[str]: file = ( @@ -30,4 +30,4 @@ def get_thumbnail(self, file_id: str) -> Optional[str]: ) .execute() ) - return file["thumbnailLink"] + return file.get("thumbnailLink")