Fixes #114 - Can't delete last column anymore

This commit is contained in:
Olivier Perez 2015-11-04 12:37:53 +01:00
parent 8f2c9f07d4
commit acbf7db8b5

View File

@ -118,7 +118,7 @@ class AdminPollService {
$slots = $this->pollService->allSlotsByPoll($poll);
// We can't delete the last slot
if ($poll->format == 'D' && count($slots) === 1 && strpos($slots[0]->moments, ',') === -1) {
if ($poll->format == 'D' && count($slots) === 1 && strpos($slots[0]->moments, ',') === false) {
return false;
} elseif ($poll->format == 'A' && count($slots) === 1) {
return false;