alitheg commented on code in PR #1186:
URL:
https://github.com/apache/tooling-trusted-releases/pull/1186#discussion_r3125355354
##########
atr/get/projects.py:
##########
@@ -94,28 +95,50 @@ async def add_project(
@get.typed
-async def projects(_session: web.Public, _projects: Literal["projects"]) ->
str:
+async def projects(session: web.Public, _projects: Literal["projects"]) -> str:
"""
URL: /projects
Main project directory page.
"""
async with db.session() as data:
- projects = await
data.project(_committee=True).order_by(sql.Project.name).all()
-
- delete_forms: dict[str, htm.Element] = {}
- for project in projects:
- delete_forms[str(project.key)] = await form.render(
- model_cls=shared.projects.DeleteSelectedProject,
- action=util.as_url(post.projects.delete),
- form_classes=".d-inline-block.m-0",
- submit_classes="btn-sm btn-outline-danger",
- submit_label="Delete project",
- empty=True,
- defaults={"project_key": str(project.key)},
- confirm="Are you sure you want to delete this project? This cannot
be undone.",
- )
+ projects = await data.project(_committee=True,
_releases=True).order_by(sql.Project.name).all()
+
+ committee_project_counts: Counter[str] = Counter(str(p.committee.key) for
p in projects if p.committee)
Review Comment:
Dave's original comment read "A project that has current or archived
releases may only be archived. If archived then any current releases are also
archived." which I thought implied we should just allow archiving with current
releases.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]