Add admin issue deletion workflow
Magent CI/CD / verify (push) Successful in 10m47s
Magent CI/CD / deploy-prod (push) Skipped
Magent CI/CD / deploy-beta (push) Successful in 22s

This commit is contained in:
2026-09-01 14:58:58 +12:00
parent 16876e1cf0
commit 5de14b1cb7
5 changed files with 234 additions and 3 deletions
+17
View File
@@ -3519,6 +3519,23 @@ def update_portal_item(
return updated
def delete_portal_item(item_id: int) -> bool:
with _connect() as conn:
conn.execute(
"UPDATE portal_items SET related_item_id = NULL WHERE related_item_id = ?",
(item_id,),
)
conn.execute("DELETE FROM portal_comments WHERE item_id = ?", (item_id,))
conn.execute("DELETE FROM portal_item_activity WHERE item_id = ?", (item_id,))
deleted = conn.execute(
"DELETE FROM portal_items WHERE id = ?",
(item_id,),
).rowcount
if deleted:
logger.info("portal item deleted id=%s", item_id)
return bool(deleted)
def add_portal_comment(
item_id: int,
*,