Skip to content
This repository was archived by the owner on Jan 4, 2023. It is now read-only.
This repository was archived by the owner on Jan 4, 2023. It is now read-only.

Issue with adding multiple scenarios #227

@kjacobsen16

Description

@kjacobsen16

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

{
	"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
					}
				}
			]
		}
	]
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions