feat: add real PDF ingestion workflow
This commit is contained in:
@@ -80,7 +80,13 @@ def apply_command(project: ProjectSnapshot, request: CommandRequest) -> ProjectS
|
||||
updated.failure_reason = None
|
||||
|
||||
if request.command == WorkflowCommand.SELECT_REGION:
|
||||
updated.plan.selected_region_id = request.payload.get("region_id")
|
||||
region_id = str(request.payload.get("region_id", ""))
|
||||
if not any(region.id == region_id for region in updated.plan.regions):
|
||||
raise InvalidTransitionError(f"Region '{region_id}' does not exist in this project.")
|
||||
updated.plan.selected_region_id = region_id
|
||||
for issue in updated.plan.issues:
|
||||
if issue.kind == "region":
|
||||
issue.resolved = True
|
||||
elif request.command == WorkflowCommand.CONFIRM_PLAN:
|
||||
updated.plan.ceiling_height_mm = int(
|
||||
request.payload.get("ceiling_height_mm", updated.plan.ceiling_height_mm)
|
||||
|
||||
Reference in New Issue
Block a user