Fix flags and resolves not persisting to database

Remove proof_version_id from FlaggedItemCreate and ResolvedItemCreate
request schemas — the backend already derives it from URL path params.
The frontend was sending an empty string which caused Pydantic to reject
the request with 422, silently preventing flags/resolves from saving.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
michael 2026-02-16 07:26:11 -06:00
parent f3d7f9b6d3
commit 3e548bc949
2 changed files with 2 additions and 10 deletions

View file

@ -80,7 +80,6 @@ class ProofResponse(BaseModel):
# Audit schemas
class FlaggedItemCreate(BaseModel):
proof_version_id: uuid.UUID
agent_flagged: str
comments: Optional[str] = None
@ -102,7 +101,6 @@ class FlaggedItemResponse(BaseModel):
class ResolvedItemCreate(BaseModel):
proof_version_id: uuid.UUID
agent: str
issue: Optional[str] = None
resolution: Optional[str] = None

View file

@ -226,10 +226,7 @@ class ApiService {
}): Promise<FlaggedItemResponse> {
return this.fetch<FlaggedItemResponse>(`/proofs/${proofId}/versions/${version}/flag`, {
method: 'POST',
body: JSON.stringify({
proof_version_id: '', // Will be set by backend
...data,
}),
body: JSON.stringify(data),
});
}
@ -240,10 +237,7 @@ class ApiService {
}): Promise<ResolvedItemResponse> {
return this.fetch<ResolvedItemResponse>(`/proofs/${proofId}/versions/${version}/resolve`, {
method: 'POST',
body: JSON.stringify({
proof_version_id: '', // Will be set by backend
...data,
}),
body: JSON.stringify(data),
});
}