diff --git a/includes/model/Room_model.php b/includes/model/Room_model.php index 5c232648..eb788ebe 100644 --- a/includes/model/Room_model.php +++ b/includes/model/Room_model.php @@ -36,7 +36,7 @@ function Room_validate_name(string $name, int $room_id) */ function Rooms() { - return Room::all()->sortBy('name'); + return Room::orderBy('name')->get(); } /** diff --git a/includes/pages/schedule/ImportSchedule.php b/includes/pages/schedule/ImportSchedule.php index 455f445c..22f0391d 100644 --- a/includes/pages/schedule/ImportSchedule.php +++ b/includes/pages/schedule/ImportSchedule.php @@ -130,8 +130,8 @@ class ImportSchedule extends BaseController 'name' => 'required', 'url' => 'required', 'shift_type' => 'required|int', - 'minutes_before' => 'required|int', - 'minutes_after' => 'required|int', + 'minutes_before' => 'int', + 'minutes_after' => 'int', ]); if (!isset($this->getShiftTypes()[$data['shift_type']])) {