Commit 6b80c30
authored
Fix duplicate derived collection items when modifying source collection (#116)
A derived collection is dependent on a collection field, e.g.
`trustsSearch-field-flow`. When a user adds a collection item, the
`sourceJson` for the derived collection contains a value with that key.
When a user modifies the collection item, an additional key is added to
the `sourceJson` (in the case of the example above,
`Data[trustsSearch-field-flow]`). This causes the item to be duplicated
in the returned list, so keys of this format need to be ignored.1 parent df9a3a5 commit 6b80c30
2 files changed
Lines changed: 31 additions & 1 deletion
File tree
- src
- DfE.ExternalApplications.Infrastructure/Services
- Tests/DfE.ExternalApplications.Infrastructure.UnitTests/Services
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
211 | 211 | | |
212 | 212 | | |
213 | 213 | | |
214 | | - | |
| 214 | + | |
215 | 215 | | |
216 | 216 | | |
217 | 217 | | |
| |||
Lines changed: 30 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
65 | 95 | | |
0 commit comments