diff --git a/app/services/task_service/handle_groups.rb b/app/services/task_service/handle_groups.rb index 4ae5cddda..31010a290 100644 --- a/app/services/task_service/handle_groups.rb +++ b/app/services/task_service/handle_groups.rb @@ -18,7 +18,7 @@ def execute def handle_groups return unless @group_tasks_params - groups = @group_tasks_params[:group_ids].filter(&:present?).map(&:to_i).map {|gid| Group.find(gid) } + groups = @group_tasks_params[:group_ids].compact_blank.map(&:to_i).map {|gid| Group.find(gid) } remove_groups(@task.groups - groups) add_groups(groups - @task.groups) end