Commit ba4e804
fix(song): constrain
We currently implicitly expect all songs on the website to have been generated with Note Block Studio, which will save songs with either 16 or 20 default instruments since the first NBS format upgrade. If a custom-generated song is uploaded that contains fewer instruments, the song normalization should coerce it to have one of these instrument counts. The database allowed any integer to be in this field, though, which is fine. However, in the case this coercion process fails, we would like an extra safeguard so it fails 'early' before the suspicious document is persisted to the database.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>defaultInstrumentCount to 16 or 201 parent ea01553 commit ba4e804
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
| 59 | + | |
59 | 60 | | |
60 | | - | |
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
| |||
0 commit comments