diff options
Diffstat (limited to 'app/services/boards')
-rw-r--r-- | app/services/boards/destroy_service.rb | 4 | ||||
-rw-r--r-- | app/services/boards/lists/move_service.rb | 2 |
2 files changed, 1 insertions, 5 deletions
diff --git a/app/services/boards/destroy_service.rb b/app/services/boards/destroy_service.rb index 0b1cd61b119..ceda005044e 100644 --- a/app/services/boards/destroy_service.rb +++ b/app/services/boards/destroy_service.rb @@ -3,10 +3,6 @@ module Boards class DestroyService < Boards::BaseService def execute(board) - if boards.size == 1 - return ServiceResponse.error(message: "The board could not be deleted, because the parent doesn't have any other boards.") - end - board.destroy! ServiceResponse.success diff --git a/app/services/boards/lists/move_service.rb b/app/services/boards/lists/move_service.rb index 93f81837d1a..4bb7b4dbc6d 100644 --- a/app/services/boards/lists/move_service.rb +++ b/app/services/boards/lists/move_service.rb @@ -23,7 +23,7 @@ module Boards def valid_move? new_position.present? && new_position != old_position && - new_position >= 0 && new_position < board.lists.movable.size + new_position >= 0 && new_position <= board.lists.movable.last.position end def reorder_intermediate_lists |