mirror of
https://github.com/zulip/zulip.git
synced 2025-11-02 21:13:36 +00:00
thumbnail: Skip avatars whose old versions are missing.
This commit is contained in:
committed by
Tim Abbott
parent
4d3d3efcf1
commit
a4981c13f7
@@ -74,6 +74,7 @@ def thumbnail_s3_avatars(users: QuerySet[Any]) -> None:
|
|||||||
original_bytes = old_data["Body"].read()
|
original_bytes = old_data["Body"].read()
|
||||||
except Exception:
|
except Exception:
|
||||||
print(f"Failed to fetch {old_base}")
|
print(f"Failed to fetch {old_base}")
|
||||||
|
continue
|
||||||
|
|
||||||
avatar_bucket.Object(new_base + ".original").copy_from(
|
avatar_bucket.Object(new_base + ".original").copy_from(
|
||||||
CopySource=f"{settings.S3_AVATAR_BUCKET}/{old_base}.original",
|
CopySource=f"{settings.S3_AVATAR_BUCKET}/{old_base}.original",
|
||||||
|
|||||||
Reference in New Issue
Block a user