feat(campaign): record unmatched file disposition
This commit is contained in:
@@ -876,6 +876,9 @@ def build_version(
|
||||
"write_eml": write_eml,
|
||||
"built_count": result.get("built_count"),
|
||||
"recovery_operation_id": recovery_start.operation_id,
|
||||
"residual_file_disposition": _residual_file_audit_evidence(
|
||||
result.get("residual_file_disposition")
|
||||
),
|
||||
},
|
||||
commit=True,
|
||||
)
|
||||
@@ -906,3 +909,19 @@ def build_version(
|
||||
raise HTTPException(
|
||||
status_code=status.HTTP_422_UNPROCESSABLE_CONTENT, detail=str(exc)
|
||||
) from exc
|
||||
|
||||
|
||||
def _residual_file_audit_evidence(value: object) -> dict[str, object]:
|
||||
if not isinstance(value, dict):
|
||||
return {}
|
||||
return {
|
||||
key: value.get(key)
|
||||
for key in (
|
||||
"contract_version",
|
||||
"action",
|
||||
"routing_mode",
|
||||
"validation_behavior",
|
||||
"watched_source_count",
|
||||
"residual_file_count",
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user