Account deletion: supervisor branch

未关闭
#180 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
48/100
Issue 类型
功能
描述清晰度
描述清楚
活跃度
活跃
技术栈
fastapi, python
领域
api, backend, database

调研方向

Start from the handler for DELETE /employees/me and inspect the petition models, existing transaction and deletion patterns, EmailHandler templates, BackgroundTasks, and send_serialized_data_to_clerks. Implement the listed supervisor branch and check the related tests for deletion, notifications, clerk updates, and the 204 response, including the no-petitions case. Done means the specified petition changes, emails, and clerk refresh occur as required.

由索引模型根据 Issue 内容生成。

描述

Part of the Account deletion parent (#181). Depends on (b) #179.

Tasks

  • Supervisor branch of DELETE /employees/me (handler), in one transaction:
    1. Capture the supervisor's non-completed petitions (Petition.user_account == sub): id, student_username/student_mail, start/end date, status, budget approvers
    2. Delete those petitions (budget positions cascade)
    3. On the supervisor's completed petitions, set user_account = NULL and supervisor_mail = NULL
    4. Commit
  • Mail the student + all budget approvers per deleted petition (DE+EN template via EmailHandler + BackgroundTasks)
  • If any affected petition had a clerk-relevant status, push the refreshed clerk list via send_serialized_data_to_clerks
  • Always return 204 (also when the supervisor has no petitions)
主要语言
Python
星标
0
派生
0
平均合并
12 小时 7 分钟
30 天内合并 PR
18

环境准备

  • 提供 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 没有贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

ClockGU/clockwork-backend 的其他 Issue

查看 ClockGU/clockwork-backend 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。