I realized I didn't create an issue for this. When we send a scenario object with multiple regression equations to the Add Scenario endpoint, we get DB errors and only one gets added to the DB. This seems like a threading issue, so something needs to be cleared out or waited for (Chad was helping me look into this but then we had a migration).
{
"region": {
"name": "Test"
},
"statisticGroupID": 5,
"statisticGroupName": "Flow-Duration Statistics",
"regressionRegions": [
{
"ID": 834,
"code": "GCTest2",
"name": "Test2",
"parameters": [
{
"code": "SN10",
"limits": {
"max": 25.1,
"min": 2.2
},
"unitType": {
"id": 36
}
}
],
"regressions": [
{
"ID": 45,
"code": "V1D500Y",
"name": "1 Day 500 Year Maximum",
"errors": [],
"unit": {
"id": 5
},
"equation": "2*SN10",
"equivalentYears": 3,
"predictionInterval": null,
"expected": {
"parameters": {
"SN10": 0
},
"intervalBounds": null
}
},
{
"ID": 1267,
"code": "D0_1",
"name": "0.1 Percent Duration",
"errors": [],
"unit": {
"id": 8
},
"equation": "9*SN10",
"equivalentYears": null,
"predictionInterval": null,
"expected": {
"parameters": {
"SN10": 0
},
"intervalBounds": null
}
}
]
}
]
}
I realized I didn't create an issue for this. When we send a scenario object with multiple regression equations to the Add Scenario endpoint, we get DB errors and only one gets added to the DB. This seems like a threading issue, so something needs to be cleared out or waited for (Chad was helping me look into this but then we had a migration).
Example scenario:
http://localhost:53813/scenarios?statisticgroupIDorCode=5&skipCheck=true