diff options
Diffstat (limited to 'includes/view/ShiftCalendarRenderer.php')
-rw-r--r-- | includes/view/ShiftCalendarRenderer.php | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/includes/view/ShiftCalendarRenderer.php b/includes/view/ShiftCalendarRenderer.php index df24ad3b..3269f338 100644 --- a/includes/view/ShiftCalendarRenderer.php +++ b/includes/view/ShiftCalendarRenderer.php @@ -1,6 +1,8 @@ <?php namespace Engelsystem; +use Exception; + class ShiftCalendarRenderer { @@ -93,9 +95,9 @@ class ShiftCalendarRenderer $shift_added = false; foreach ($lanes[$room_id] as $lane) { /** @var ShiftCalendarLane $lane */ - try { + if($lane->shiftFits($shift)) { $lane->addShift($shift); - } catch (Exception $e) { + $shift_added = true; break; } } |