Skip to content

Commit 31d0de0

Browse files
Return APIv2 results on query parameter status (#2376)
Fixes #2375
1 parent a9c802b commit 31d0de0

2 files changed

Lines changed: 9 additions & 0 deletions

File tree

changelog_entry.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
- bump: patch
2+
changes:
3+
added:
4+
- Ability to return APIv2 results.

policyengine_api/jobs/calculate_economy_simulation_job.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,11 @@ def run(
203203
except:
204204
print("APIv2 COMPARISON: ERROR COMPARING", result)
205205

206+
if options.get("apiv2", False):
207+
# If the APIv2 job was successful, use its result
208+
if result is not None:
209+
impact = result
210+
206211
# Finally, update all reform impact rows with the same baseline and reform policy IDs
207212
reform_impacts_service.set_complete_reform_impact(
208213
country_id=country_id,

0 commit comments

Comments
 (0)