Duplicate entries due to wrong cradle_to_shelf to scope 3_bp mapping
Problem description
When using the /search/batch endpoint, I get two response records instead of one back. This is because the record_id=4cb6d676-2f25-41da-afdf-ad549bc901ff has scope 3_bp in combination with lca_activity=cradle_to_shelf.
Expected Behaviour
I'd expect that cradle_to_shelf returns scope_pp. When I then filter by scope 3_bp, I only should get the cradle_to-gate record back.
Environment
Production
How to reproduce
Request
[
{
"activity_id": "raising_of_animals_nec_services_to_agriculture",
"country": "PER",
"impact_category": "land_use",
"impact_indicator": "pastures",
"flow": "land_occupation",
"activity_classification_system": "gloria",
"scope": "3",
"valuation": "bp",
"size": 50,
"primary_data_year": 2021
}
]
Response
[
{
"num_records": 2,
"records": [
{
"record_id": "37ea688e-c1f1-4883-a21c-cb5e99fbc1f8",
"activity": {
"activity_id": "raising_of_animals_nec_services_to_agriculture",
"unit": "USD",
"lca_activity": "cradle_to-gate",
"classification": {
"type": "gloria",
"code": ""
}
},
"location": {
"region": "South America",
"country": "PER",
"subnational": ""
},
"impact": {
"category": "land_use",
"indicator": "pastures",
"flow": "land_occupation",
"unit": "ha",
"scope": {
"type": 3,
"valuation": "bp"
},
"method": "faostat"
},
"source_data": {
"source": "IELab",
"data_source_release_version": "059a",
"source_url": "https://ielab.info/labs/ielab-gloria",
"fpl_data_version": "v1.1.6",
"release_date": 2024
},
"value": 8.708279251368718e-07,
"unit": "ha/USD",
"data_year": 2021
},
{
"record_id": "4cb6d676-2f25-41da-afdf-ad549bc901ff",
"activity": {
"activity_id": "raising_of_animals_nec_services_to_agriculture",
"unit": "USD",
"lca_activity": "cradle_to_shelf",
"classification": {
"type": "gloria",
"code": ""
}
},
"location": {
"region": "South America",
"country": "PER",
"subnational": ""
},
"impact": {
"category": "land_use",
"indicator": "pastures",
"flow": "land_occupation",
"unit": "ha",
"scope": {
"type": 3,
"valuation": "bp"
},
"method": "SCP-HAT"
},
"source_data": {
"source": "FootprintLab",
"data_source_release_version": "v059",
"source_url": "https://www.footprintlab.io/",
"fpl_data_version": "v1.1.5",
"release_date": 2025
},
"value": 9.999999999975306e-07,
"unit": "ha/USD",
"data_year": 2021
}
],
"info": null
}
]
Edited by Markus Jura