Fix Project and Tag model fields in PyPI proxy
Use correct model fields: - Project: is_public, is_system, created_by (not visibility) - Tag: add required created_by field
This commit is contained in:
@@ -488,7 +488,9 @@ async def pypi_download_file(
|
|||||||
system_project = Project(
|
system_project = Project(
|
||||||
name="_pypi",
|
name="_pypi",
|
||||||
description="System project for cached PyPI packages",
|
description="System project for cached PyPI packages",
|
||||||
visibility="private",
|
is_public=False,
|
||||||
|
is_system=True,
|
||||||
|
created_by="pypi-proxy",
|
||||||
)
|
)
|
||||||
db.add(system_project)
|
db.add(system_project)
|
||||||
db.flush()
|
db.flush()
|
||||||
@@ -519,6 +521,7 @@ async def pypi_download_file(
|
|||||||
package_id=package.id,
|
package_id=package.id,
|
||||||
name=filename,
|
name=filename,
|
||||||
artifact_id=sha256,
|
artifact_id=sha256,
|
||||||
|
created_by="pypi-proxy",
|
||||||
)
|
)
|
||||||
db.add(tag)
|
db.add(tag)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user