Commit 47b0bcb
committed
Fix assay template save: correct rowid key casing and don't log expected validations
The switch to QueryUpdateService passed the update key as Map.of("rowId", templateId), but the primary key column is "rowid" and Map.of produces a case-sensitive map, so DefaultQueryUpdateService.getKeys() never found it and threw InvalidKeyException: Value for key field 'rowid' was null or not supplied!. This broke ViralLoadAssayTest. Corrected the key to "rowid" in both AssayHelper.saveTemplate and DefaultAssayParser.saveTemplate.
The broadened catch (Exception) in AssayHelper.saveTemplate was logging expected BatchValidationExceptions from validateTemplate()/insertRows() via _log.error, so normal validation failures (e.g. "Must provide at least 2 negative controls") landed in labkey-errors.log and tripped the Selenium harness's checkErrors(), failing ELISPOT_AssayTest. Let BatchValidationException propagate ahead of the generic catch in both methods so these surface as client validation errors, not server errors.1 parent e448eaf commit 47b0bcb
2 files changed
Lines changed: 12 additions & 2 deletions
File tree
- laboratory
- api-src/org/labkey/api/laboratory/assay
- src/org/labkey/laboratory/assay
Lines changed: 5 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
485 | 485 | | |
486 | 486 | | |
487 | 487 | | |
488 | | - | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
489 | 493 | | |
490 | 494 | | |
491 | 495 | | |
| |||
Lines changed: 7 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
158 | 158 | | |
159 | 159 | | |
160 | 160 | | |
161 | | - | |
| 161 | + | |
162 | 162 | | |
163 | 163 | | |
164 | 164 | | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
165 | 171 | | |
166 | 172 | | |
167 | 173 | | |
| |||
0 commit comments