From 547daed5a07bb722869af43be9d86d78e29fc78d Mon Sep 17 00:00:00 2001 From: Sebastian Serth Date: Fri, 25 Oct 2024 17:30:20 +0200 Subject: [PATCH] Fix Rubocop offense --- app/services/task_service/handle_groups.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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