FEAT-8c: mark conflict animals in animals.json for the API loader
Adds a machine-readable conflict:bool to each merged animal (true when files disagree on genotype/farbschlag/death) so the import loader can quarantine the 32 conflicts without parsing the German review report.
This commit is contained in:
@@ -554,10 +554,14 @@ def dedup(animals):
|
|||||||
"photos": sorted(set(photos)),
|
"photos": sorted(set(photos)),
|
||||||
"sourceFiles": sorted(files),
|
"sourceFiles": sorted(files),
|
||||||
"mentions": len(grp),
|
"mentions": len(grp),
|
||||||
|
# FEAT-8c: machine-readable quarantine marker so the API loader can skip
|
||||||
|
# conflicting records without parsing the German review report.
|
||||||
|
"conflict": False,
|
||||||
}
|
}
|
||||||
merged.append(out)
|
merged.append(out)
|
||||||
# conflict: same animal, disagreeing genotype or farbschlag or death
|
# conflict: same animal, disagreeing genotype or farbschlag or death
|
||||||
if len(genos) > 1 or len(farb) > 1 or len(deaths) > 1:
|
if len(genos) > 1 or len(farb) > 1 or len(deaths) > 1:
|
||||||
|
out["conflict"] = True
|
||||||
conflicts.append({
|
conflicts.append({
|
||||||
"id": out["id"], "name": base["name"], "dob": out["dob"],
|
"id": out["id"], "name": base["name"], "dob": out["dob"],
|
||||||
"genotypes": sorted(genos), "farbschlaege": sorted(farb),
|
"genotypes": sorted(genos), "farbschlaege": sorted(farb),
|
||||||
|
|||||||
Reference in New Issue
Block a user