UniversityRadioYork / MyRadio

University Radio York's back-end radio management system
https://ury.org.uk/myradio
16 stars 16 forks source link

Ensure season applications request at least one timeslot #1058

Open markspolakovs opened 2 years ago

markspolakovs commented 2 years ago

Empty seasons are pointless (unlike empty shows), so it'd be good to validate this.

markspolakovs commented 2 years ago

https://github.com/UniversityRadioYork/MyRadio/blob/master/src/Classes/ServiceAPI/MyRadio_Season.php#L174 is the function that creates a season - best way to implement this is likely to check count($params['weeks']) and throw a MyRadioException with code 400 if this is zero.