bcgov / nr-rfc-alertauthoring

a tool to help create structured data for River Forecast Centre alert feeds
Apache License 2.0
0 stars 0 forks source link

Create Alert Page throwing Errors #120

Closed franTarkenton closed 3 weeks ago

franTarkenton commented 3 weeks ago

Not sure what the problem is, but the backend is throwing an error when the data is sent to the backend from the frontend via the create_alert() method.

Expected Behaviour when new alert is described on the 'create' page it should update in the database via the api.

Actual Behaviour frontend allows authoring of the component, however when submit is pressed it results in an 500 error. The issue has to do with the creation of the alert object in the database.

franTarkenton commented 3 weeks ago

identified that the problem occurs when there is a alert_level / basin selection box that gets added to the form, but is not populated.

franTarkenton commented 3 weeks ago

Added code to backend that remove any alert level/basin records from the database transaction if either the basin name or the alert area are blank. There are tickets in the backlog to also sort this out on the frontend, ie provide the user with a warning if there is a blank record defined in the form

franTarkenton commented 3 weeks ago

resolved: https://github.com/bcgov/nr-rfc-alertauthoring/pull/121