fix: normalise reported claim evidence kind
This commit is contained in:
@@ -16,6 +16,18 @@ export function normaliseAnalysisResponse(input) {
|
||||
normalised.evidence = normalised.evidence.map((record, index) => {
|
||||
if (!record || typeof record !== "object") return record;
|
||||
|
||||
if (record.evidenceType === "reported_claim") {
|
||||
changesApplied.push({
|
||||
path: ["evidence", index, "evidenceType"],
|
||||
change: "Converted reported_claim to reported_statement",
|
||||
});
|
||||
|
||||
record = {
|
||||
...record,
|
||||
evidenceType: "reported_statement",
|
||||
};
|
||||
}
|
||||
|
||||
if (record.source === null) {
|
||||
changesApplied.push({
|
||||
path: ["evidence", index, "source"],
|
||||
|
||||
Reference in New Issue
Block a user