feat: add upload and delete option for releases
This commit is contained in:
@@ -23,7 +23,7 @@ def install_specs_from_versions(version_list):
|
||||
present = set()
|
||||
for ver in version_list:
|
||||
for field_name, *_ in INSTALLABLE_PLATFORM_SPECS:
|
||||
if (getattr(ver, field_name) or "").strip():
|
||||
if ver.has_platform_asset(field_name):
|
||||
present.add(field_name)
|
||||
return tuple(s for s in INSTALLABLE_PLATFORM_SPECS if s[0] in present)
|
||||
|
||||
@@ -95,9 +95,14 @@ def build_archive_context(distribution, active_versions, product):
|
||||
for ver in archive:
|
||||
cells = []
|
||||
for field_name, label, icon in specs:
|
||||
u = (getattr(ver, field_name) or "").strip()
|
||||
cells.append(
|
||||
{"field": field_name, "label": label, "icon": icon, "url": u}
|
||||
{
|
||||
"field": field_name,
|
||||
"label": label,
|
||||
"icon": icon,
|
||||
"url": ver.resolve_asset_url(field_name),
|
||||
"external": bool((getattr(ver, field_name) or "").strip()),
|
||||
}
|
||||
)
|
||||
archive_rows_installable.append({"version_obj": ver, "cells": cells})
|
||||
context["archive_rows_installable"] = archive_rows_installable
|
||||
|
||||
Reference in New Issue
Block a user