Describe the bug
After initial creation of a forecast instance, any subsequent patch will fail. Issue appears to be related to storing a null spec-id.
Expected behavior
This should update the existing forecast instance, rather than failing with an exception.
To Reproduce
Steps to reproduce the behavior:
- Create a forecast instance and store
- Attempt to store the same forecast instance
- See error
Logs/Incident Identifier
3-Mar-2026 10:10:15.876 WARNING [http-nio-auto-1-exec-10] cwms.cda.ApiServlet.lambda$init$8 error on request[2db143e2-a925-488b-a62e-34716aa1ab9b]: /cwms-data/forecast-instance/
org.jooq.exception.IntegrityConstraintViolationException: SQL [{ call "CWMS_20"."CWMS_FCST"."STORE_FCST" (?, ?, cast(? as date), cast(? as date), ?, ?, ?, ?, ?, ?, ?, ?) }]; ORA-01400: cannot insert NULL into ("CWMS_20"."AT_FCST_INST"."FCST_SPEC_CODE")
Additional context
This is blocking work for Extract/Post enhancements, which requires storing a forecast instance more than once. There is an existing integration test for create/update, but it is disabled with a comment describing this issue.