Commit 537b2d7
committed
Add safe navigation to file_formats method
Why these changes are being introduced:
We are calling `uniq` on `file_formats`, which
returns a nil error if that field does not exist.
Relevant ticket(s):
- [TIMX-628](https://mitlibraries.atlassian.net/browse/TIMX-628)
How this addresses that need:
This adds a safe navigation operator to the
`file_formats` method.
Side effects of this change:
I added a regression test, which creates a new
test file. It feels a bit odd not to test the
other Record Type methods in there, but doing so
seemed far out of scope of this ticket.1 parent 78ee617 commit 537b2d7
2 files changed
Lines changed: 25 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
217 | 217 | | |
218 | 218 | | |
219 | 219 | | |
220 | | - | |
| 220 | + | |
221 | 221 | | |
222 | 222 | | |
223 | 223 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
0 commit comments