From 2c03dbee3e5579a6737472601f1c1086e1a2bce3 Mon Sep 17 00:00:00 2001 From: umsangdon Date: Sun, 6 Sep 2026 11:46:11 +0900 Subject: [PATCH] =?UTF-8?q?fix(B01):=20=EA=B0=92=20=EB=B3=80=EA=B2=BD=20?= =?UTF-8?q?=EC=97=86=EC=9D=B4=20=EC=B0=B8=EC=97=AC=EC=9E=90=EB=A7=8C=20?= =?UTF-8?q?=EC=A0=80=EC=9E=A5=ED=95=A0=20=EB=95=8C=20404=20=EB=B0=98?= =?UTF-8?q?=ED=99=98=20=EB=AC=B8=EC=A0=9C=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - update_project 가 rowcount 0(변경된 컬럼 없음)을 프로젝트 없음으로 오판하던 자리에 존재 확인 추가 - 참여자 수정권한·시스템 회사 역할 규칙 검증 테스트 추가 (tmp/tests, git 추적 제외) Co-Authored-By: Claude Opus 5 (1M context) --- B01_Dashboard/B01_Dashboard_Repository.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/B01_Dashboard/B01_Dashboard_Repository.py b/B01_Dashboard/B01_Dashboard_Repository.py index 9a3976f3..25fee587 100644 --- a/B01_Dashboard/B01_Dashboard_Repository.py +++ b/B01_Dashboard/B01_Dashboard_Repository.py @@ -287,7 +287,14 @@ async def update_project(project_id: str, data: dict[str, Any], actor_id: int) - ), ) changed = cursor.rowcount > 0 - if changed: + if not changed: + # 값이 하나도 안 바뀌면 rowcount 가 0 이다 — 프로젝트가 없는 것과는 다르다 + # (참여자만 바꿀 때 「찾을 수 없습니다」로 튕기던 자리, 2026-09-06). + await cursor.execute( + "SELECT 1 FROM projects WHERE id = %s AND deleted_at IS NULL", (project_id,) + ) + changed = await cursor.fetchone() is not None + else: await cursor.execute( """INSERT INTO system_audit_logs (user_id, action, resource_type, resource_id) VALUES (%s, 'PROJECT_UPDATE', 'project', NULL)""",