From d797cc95e9ddb604c5567f7a93862e3e19b44cc5 Mon Sep 17 00:00:00 2001 From: Dominik Klein Date: Mon, 25 Sep 2023 13:04:30 +0200 Subject: [PATCH] Fixes #4835 - Time accounting check crashing when no group is selected. --- app/models/core_workflow/custom/ticket_time_accounting_check.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/core_workflow/custom/ticket_time_accounting_check.rb b/app/models/core_workflow/custom/ticket_time_accounting_check.rb index 96be7388bc6d..625b5b80662b 100644 --- a/app/models/core_workflow/custom/ticket_time_accounting_check.rb +++ b/app/models/core_workflow/custom/ticket_time_accounting_check.rb @@ -18,7 +18,7 @@ def enabled? end def available_for_user? - selected.persisted? && TicketPolicy.new(current_user, selected).agent_update_access? + saved.persisted? && TicketPolicy.new(current_user, saved).agent_update_access? end def selector