From 757e43fc3420f5a5540aff6669e69d9475175175 Mon Sep 17 00:00:00 2001 From: Mondo Diaz Date: Fri, 30 Jan 2026 09:58:15 -0600 Subject: [PATCH] Fix Artifact model field names in PyPI proxy Use correct Artifact model fields: - original_name instead of filename - Add required created_by and s3_key fields - Include checksum fields from storage result --- backend/app/pypi_proxy.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/backend/app/pypi_proxy.py b/backend/app/pypi_proxy.py index 6502824..9d599d7 100644 --- a/backend/app/pypi_proxy.py +++ b/backend/app/pypi_proxy.py @@ -469,10 +469,15 @@ async def pypi_download_file( # Create artifact record new_artifact = Artifact( id=sha256, - filename=filename, + original_name=filename, content_type=content_type, size=size, ref_count=1, + created_by="pypi-proxy", + s3_key=result.s3_key, + checksum_md5=result.md5, + checksum_sha1=result.sha1, + s3_etag=result.s3_etag, ) db.add(new_artifact) db.flush()