fix(449 B05 저장): 관 정본 PUT 은 세션 초안 한 번 · 노선 저장 뒤 실패면 초안을 새 노선 칸으로 · 측점 맞춤 실패 알림
- 433-7 배수판 메모리 다시 PUT 걷음(판 안 선 [저장] 빈 목록 PUT 막음) · [확정] 초안 없음 = 칸 없이 다시 셈 · 판은 저장분 다시 받기만 - 433-12 노선 저장 뒤 다른 차례 실패 = 0 칸 계획고 → 새 노선 칸 · 횡단 초안 넘김(저장 없이 · 두 번 안 넘김) · 새 노선으로 다시 세움 - 433-6 관 PUT 끝 측점 맞춤 실패 = 응답 stations_failed · 알림 - 시험 test_449_save_pipes Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -571,11 +571,12 @@ async def delete_pipe_points(project_id: UUID) -> dict[str, Any] | JSONResponse:
|
||||
return _payload(project_id, context, detail, points, False, stale)
|
||||
|
||||
|
||||
async def _stand_pipe_stations(project_id: UUID) -> None:
|
||||
async def _stand_pipe_stations(project_id: UUID) -> bool:
|
||||
"""관 PUT 끝 — 측점을 지금 관 자리로 다시 세움(`put_plus_stations` 처럼 · 부르는 길 모두 · 428).
|
||||
|
||||
노선 [저장] 뒤 관 차례가 화면 누가거리로 관을 덮으면 서버가 노선 저장 때 세운 측점과 어긋남 —
|
||||
여기서 맞추지 않으면 「측점이 없는 구조물」 · 옛 자리 카드가 남음. 실패해도 관 저장은 그대로.
|
||||
여기서 맞추지 않으면 「측점이 없는 구조물」 · 옛 자리 카드가 남음. 실패해도 관 저장은 그대로 ·
|
||||
실패 = 거짓(응답 `stations_failed` 로 알림 · 433-6).
|
||||
"""
|
||||
from B06_Section.B06_Section_Router_Stations import ensure_structure_stations
|
||||
|
||||
@@ -583,6 +584,8 @@ async def _stand_pipe_stations(project_id: UUID) -> None:
|
||||
await ensure_structure_stations(project_id)
|
||||
except Exception:
|
||||
logger.exception("관 저장: 측점 맞춤 실패(저장은 그대로): project_id=%s", project_id)
|
||||
return False
|
||||
return True
|
||||
|
||||
|
||||
@router.put("/{project_id}/drainage/pipe-points", response_model=None)
|
||||
@@ -627,8 +630,9 @@ async def put_pipe_points(
|
||||
failed = await asyncio.to_thread(
|
||||
safe_sync, resolve_stored_project_path(context.stored_path), importer(session)
|
||||
)
|
||||
await _stand_pipe_stations(project_id)
|
||||
stood = await _stand_pipe_stations(project_id)
|
||||
result = _payload(project_id, context, detail, points, True, stale)
|
||||
result["saved_count"] = saved
|
||||
result["snapshot_failed"] = failed # 못 만든 구조물 조합 복사본(142-2) — [저장] 알림
|
||||
result["stations_failed"] = not stood # 측점 맞춤 실패(433-6) — [저장] 알림
|
||||
return result
|
||||
|
||||
Reference in New Issue
Block a user