That line actually works for these. Durations2 will be []. However, the next line and the DB query would fail.

Fixed with another commit.