Commit 24dc528
authored
fix: accept null values in for each row data (#1128)
## Problem
For each 'Check step' fails when row data contains `null` values.
This was caused by zod validator only accepting `string` or `number`.
## Solution
Update schema to accept `string`, `number`, `null` and defaults to
`null` to be safe.
## How to test?
- Existing functionalities work in for each
- [ ] FormSG table field is still processed as intended
- [ ] FormSG checkboxes are still processed as intended
- [ ] Excel row data is processed as intended
- Row data with `null` values work
- Modify the _data_out_ of the find multiple rows: change one or more
values to `null`
- Use that as the input of the for each
- [ ] Items are processed correctly when running 'Check step' at for
each
- [ ] Columns are displayed correctly1 parent f2e3a24 commit 24dc528
3 files changed
+13
-3
lines changedLines changed: 6 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
3 | 8 | | |
4 | 9 | | |
5 | 10 | | |
6 | 11 | | |
7 | | - | |
| 12 | + | |
8 | 13 | | |
9 | 14 | | |
10 | 15 | | |
| |||
Lines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
| 4 | + | |
3 | 5 | | |
4 | 6 | | |
5 | 7 | | |
| |||
15 | 17 | | |
16 | 18 | | |
17 | 19 | | |
18 | | - | |
| 20 | + | |
19 | 21 | | |
20 | 22 | | |
21 | 23 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
11 | 14 | | |
12 | 15 | | |
13 | 16 | | |
| |||
0 commit comments