Fix schedule creation error when no rooms are defined
authorMagnus Hagander <magnus@hagander.net>
Thu, 30 Aug 2018 19:22:10 +0000 (21:22 +0200)
committerMagnus Hagander <magnus@hagander.net>
Thu, 30 Aug 2018 19:22:10 +0000 (21:22 +0200)
commitd796bf6762302ffdb5ad22754cf46e0310553696
tree585699504f521215ccafd294df551d640af2b2f4
parentca612472acc5b30dfb1fabe575a3c2d3c2b3f10c
Fix schedule creation error when no rooms are defined

This would previously report that there are no slots defined, due to a
join against rooms. So instead, load the list of rooms first, and give a
specific error message if they're missing.

Patch mainly from ads, though I moved the check even further up.
postgresqleu/confreg/views.py